Skip to content
Snippets Groups Projects
Verified Commit 0f538c4d authored by Pier Angelo Vendrame's avatar Pier Angelo Vendrame :jack_o_lantern:
Browse files

Bug 42027: Base Browser migration procedures.

This commit implmenents the the Base Browser's version of _migrateUI.
parent 4fb43329
Branches
Tags
1 merge request!1222Bug 43166: Rebased alpha onto 128.3.0esr
......@@ -1522,6 +1522,9 @@ BrowserGlue.prototype = {
// handle any UI migration
this._migrateUI();
// Base Browser-specific version of _migrateUI.
this._migrateUIBB();
if (!Services.prefs.prefHasUserValue(PREF_PDFJS_ISDEFAULT_CACHE_STATE)) {
lazy.PdfJs.checkIsDefault(this._isNewProfile);
}
......@@ -4655,6 +4658,25 @@ BrowserGlue.prototype = {
Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
},
_migrateUIBB() {
// Version 1: 13.0a3. Reset layout.css.prefers-color-scheme.content-override
// for tor-browser#41739.
const MIGRATION_VERSION = 1;
const MIGRATION_PREF = "basebrowser.migration.version";
// We do not care whether this is a new or old profile, since in version 1
// we just quickly clear a user preference, which should not do anything to
// new profiles.
// Shall we ever raise the version number and have a watershed, we can add
// a check easily (any version > 0 will be an old profile).
const currentVersion = Services.prefs.getIntPref(MIGRATION_PREF, 0);
if (currentVersion < 1) {
Services.prefs.clearUserPref(
"layout.css.prefers-color-scheme.content-override"
);
}
Services.prefs.setIntPref(MIGRATION_PREF, MIGRATION_VERSION);
},
async _showUpgradeDialog() {
const data = await lazy.OnboardingMessageProvider.getUpgradeMessage();
const { gBrowser } = lazy.BrowserWindowTracker.getTopWindow();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment