Bug 1414965 - Reset geo preferences for Firefox 57. r=florian
☠☠ backed out by c6325a375c4c ☠ ☠
authorMichael Kaply <mozilla@kaply.com>
Mon, 06 Nov 2017 16:01:34 -0600
changeset 443687 d44fe4ae02fe3dd94080347722cdde0c5d44be02
parent 443682 ab8fb74b86d40aff7a8f8fcd35d3c49e382da583
child 443688 3a9662efa80c5763e146c2e9ea7e2570dd327e67
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersflorian
bugs1414965
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1414965 - Reset geo preferences for Firefox 57. r=florian MozReview-Commit-ID: FukSW7TB4Av
browser/components/nsBrowserGlue.js
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -1740,17 +1740,17 @@ BrowserGlue.prototype = {
         return;
       this._openPreferences("sync", { origin: "doorhanger" });
     };
     this.AlertsService.showAlertNotification(null, title, body, true, null, clickCallback);
   },
 
   // eslint-disable-next-line complexity
   _migrateUI: function BG__migrateUI() {
-    const UI_VERSION = 57;
+    const UI_VERSION = 58;
     const BROWSER_DOCURL = "chrome://browser/content/browser.xul";
 
     let currentUIVersion;
     if (Services.prefs.prefHasUserValue("browser.migration.version")) {
       currentUIVersion = Services.prefs.getIntPref("browser.migration.version");
     } else {
       // This is a new profile, nothing to migrate.
       Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
@@ -2165,16 +2165,23 @@ BrowserGlue.prototype = {
           if (renaissanceTheme) {
             renaissanceTheme.accentcolor = "#834d29";
             lwthemePrefs.setStringPref("usedThemes", JSON.stringify(usedThemes));
           }
         } catch (e) { /* Don't panic if this pref isn't what we expect it to be. */ }
       }
     }
 
+    if (currentUIVersion < 58) {
+      // With Firefox 57, we are doing a one time reset of the geo prefs due to bug 1413652
+      Services.prefs.clearUserPref("browser.search.countryCode");
+      Services.prefs.clearUserPref("browser.search.region");
+      Services.prefs.clearUserPref("browser.search.isUS");
+    }
+
     // Update the migration version.
     Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
   },
 
   _checkForDefaultBrowser() {
     // Perform default browser checking.
     if (!ShellService) {
       return;