Bug 1110420: need to not do geo-specific defaults for distribution builds. r=markh, a=gavin
authorGavin Sharp <gavin@gavinsharp.com>
Mon, 29 Dec 2014 10:10:58 +1100
changeset 234375 7023ec60f4fbcd80b969edcb8d00d0607e055378
parent 234374 5829fa2b02346a4723bddabd704426c00fdcaeb2
child 234376 73145d9c6bdecc52be9e4032336af0d9ea644abf
push id4285
push usergsharp@mozilla.com
push dateMon, 29 Dec 2014 16:04:15 +0000
treeherdermozilla-beta@7023ec60f4fb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmarkh, gavin
bugs1110420
milestone35.0
Bug 1110420: need to not do geo-specific defaults for distribution builds. r=markh, a=gavin
toolkit/components/search/nsSearchService.js
--- a/toolkit/components/search/nsSearchService.js
+++ b/toolkit/components/search/nsSearchService.js
@@ -404,17 +404,22 @@ loadListener.prototype = {
 // Hacky method that tries to determine if this user is in a US geography, and
 // using an en-US build.
 function getIsUS() {
   let geoSpecificDefaults = false;
   try {
     geoSpecificDefaults = Services.prefs.getBoolPref("browser.search.geoSpecificDefaults");
   } catch(e) {}
 
-  if (!geoSpecificDefaults) {
+  let distroID;
+  try {
+    distroID = Services.prefs.getCharPref("distribution.id");
+  } catch (e) {}
+
+  if (!geoSpecificDefaults || distroID) {
     return false;
   }
 
   // If we've set the pref before, just return that result.
   let cachePref = "browser.search.isUS";
   try {
     return Services.prefs.getBoolPref(cachePref);
   } catch(e) {}