author | Mark Hammond <mhammond@skippinet.com.au> |
Tue, 08 Aug 2017 15:07:10 +1000 | |
changeset 374669 | 5d879d2d773034c969103f8756e331089b193291 |
parent 374668 | faaf89285517cacf28cd764294ce2b0e0486f94d |
child 374670 | 2cca20fca12c1abf92545966332215f895bf61a8 |
push id | 48762 |
push user | mhammond@skippinet.com.au |
push date | Tue, 15 Aug 2017 01:50:22 +0000 |
treeherder | autoland@5d879d2d7730 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | MattN |
bugs | 1385179 |
milestone | 57.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/browser/extensions/formautofill/bootstrap.js +++ b/browser/extensions/formautofill/bootstrap.js @@ -60,16 +60,19 @@ function isAvailable() { return locale == "en-US" && region == "US"; } return false; } function startup(data) { if (!isAvailable()) { Services.prefs.clearUserPref("dom.forms.autocomplete.formautofill"); + // reset the sync related prefs incase the feature was previously available + // but isn't now. + Services.prefs.clearUserPref("services.sync.engine.addresses.available"); return; } if (data.hasOwnProperty("instanceID") && data.instanceID) { if (AddonManagerPrivate.isDBLoaded()) { addUpgradeListener(data.instanceID); } else { // Wait for the extension database to be loaded so we don't cause its init. @@ -82,16 +85,21 @@ function startup(data) { throw Error("no instanceID passed to bootstrap startup"); } // This pref is used for web contents to detect the autocomplete feature. // When it's true, "element.autocomplete" will return tokens we currently // support -- otherwise it'll return an empty string. Services.prefs.setBoolPref("dom.forms.autocomplete.formautofill", true); + // This pref determines whether the "addresses" sync engine is available + // (ie, whether it is shown in any UI etc) - it *does not* determine whether + // the engine is actually enabled or not. + Services.prefs.setBoolPref("services.sync.engine.addresses.available", true); + // Listen for the autocomplete popup message to lazily append our stylesheet related to the popup. Services.mm.addMessageListener("FormAutoComplete:MaybeOpenPopup", onMaybeOpenPopup); let parent = new FormAutofillParent(); parent.init().catch(Cu.reportError); Services.ppmm.loadProcessScript("data:,new " + function() { Components.utils.import("resource://formautofill/FormAutofillContent.jsm"); }, true);