Bug 1414965 - Reset geo preferences for Firefox 57. r=florian
authorMichael Kaply <mozilla@kaply.com>
Mon, 06 Nov 2017 16:01:34 -0600
changeset 443779 b7f758a76a87003ab42311742ef32eacdde02c91
parent 443778 7dbef7d88601a8e85e27c020e1be4953c6af6385
child 443780 bbfe61dcf41af0e13aa075b244a34063e45e35c2
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;