зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1571639 - Don't add distro bookmarks if profile has been reset. r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D42944 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
20f01277a6
Коммит
75cc371860
|
@ -314,9 +314,19 @@ DistributionCustomizer.prototype = {
|
||||||
".bookmarksProcessed";
|
".bookmarksProcessed";
|
||||||
}
|
}
|
||||||
|
|
||||||
let bmProcessed = Services.prefs.getBoolPref(bmProcessedPref, false);
|
if (Services.prefs.getBoolPref(bmProcessedPref, false)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!bmProcessed) {
|
let ProfileAge = ChromeUtils.import(
|
||||||
|
"resource://gre/modules/ProfileAge.jsm",
|
||||||
|
{}
|
||||||
|
).ProfileAge;
|
||||||
|
let profileAge = await ProfileAge();
|
||||||
|
let resetDate = await profileAge.reset;
|
||||||
|
|
||||||
|
// If the profile has been reset, don't recreate bookmarks.
|
||||||
|
if (!resetDate) {
|
||||||
if (sections.BookmarksMenu) {
|
if (sections.BookmarksMenu) {
|
||||||
await this._parseBookmarksSection(
|
await this._parseBookmarksSection(
|
||||||
PlacesUtils.bookmarks.menuGuid,
|
PlacesUtils.bookmarks.menuGuid,
|
||||||
|
@ -329,8 +339,8 @@ DistributionCustomizer.prototype = {
|
||||||
"BookmarksToolbar"
|
"BookmarksToolbar"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Services.prefs.setBoolPref(bmProcessedPref, true);
|
|
||||||
}
|
}
|
||||||
|
Services.prefs.setBoolPref(bmProcessedPref, true);
|
||||||
},
|
},
|
||||||
|
|
||||||
_prefDefaultsApplied: false,
|
_prefDefaultsApplied: false,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче