Bug 1385179 - Enable addresses sync engine as formautofill initializes. r=MattN

MozReview-Commit-ID: BPikY3wM8Df

--HG--
extra : rebase_source : 25b6cb370238453e80d0ea0a7ea4f1c999715969
This commit is contained in:
Mark Hammond 2017-08-08 15:07:10 +10:00
Родитель c380d85502
Коммит 1f668f52d6
1 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -65,6 +65,9 @@ function isAvailable() {
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;
}
@ -87,6 +90,11 @@ function startup(data) {
// 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);