mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
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:
parent
20f01277a6
commit
75cc371860
@ -314,9 +314,19 @@ DistributionCustomizer.prototype = {
|
||||
".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) {
|
||||
await this._parseBookmarksSection(
|
||||
PlacesUtils.bookmarks.menuGuid,
|
||||
@ -329,8 +339,8 @@ DistributionCustomizer.prototype = {
|
||||
"BookmarksToolbar"
|
||||
);
|
||||
}
|
||||
Services.prefs.setBoolPref(bmProcessedPref, true);
|
||||
}
|
||||
Services.prefs.setBoolPref(bmProcessedPref, true);
|
||||
},
|
||||
|
||||
_prefDefaultsApplied: false,
|
||||
|
Loading…
Reference in New Issue
Block a user