Bug 1498378 - Actually remove the old onboarding add-on's prefs r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D8598

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Ursula Sarracini 2018-10-15 14:04:43 +00:00
parent cb18367fe4
commit 057fe36fc6

View File

@ -2183,7 +2183,7 @@ BrowserGlue.prototype = {
_migrateUI: function BG__migrateUI() {
// Use an increasing number to keep track of the current migration state.
// Completely unrelated to the current Firefox release number.
const UI_VERSION = 75;
const UI_VERSION = 76;
const BROWSER_DOCURL = AppConstants.BROWSER_CHROME_URL;
let currentUIVersion;
@ -2307,16 +2307,8 @@ BrowserGlue.prototype = {
}
}
if (currentUIVersion < 54) {
// Clear old onboarding prefs from profile (bug 1462415)
let onboardingPrefs = Services.prefs.getBranch("browser.onboarding.");
if (onboardingPrefs) {
let onboardingPrefsArray = onboardingPrefs.getChildList("");
for (let item of onboardingPrefsArray) {
Services.prefs.clearUserPref("browser.onboarding." + item);
}
}
}
// currentUIVersion < 49 and < 54 were originally used for onboarding prefs and
// have since then been removed and cleared in currentUIVersion < 76
if (currentUIVersion < 55) {
Services.prefs.clearUserPref("browser.customizemode.tip0.shown");
@ -2541,6 +2533,17 @@ BrowserGlue.prototype = {
Services.prefs.setIntPref("browser.livebookmarks.migrationAttemptsLeft", 5);
}
if (currentUIVersion < 76) {
// Clear old onboarding prefs from profile (bug 1462415)
let onboardingPrefs = Services.prefs.getBranch("browser.onboarding.");
if (onboardingPrefs) {
let onboardingPrefsArray = onboardingPrefs.getChildList("");
for (let item of onboardingPrefsArray) {
Services.prefs.clearUserPref("browser.onboarding." + item);
}
}
}
// Update the migration version.
Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
},