Bug 1110420: need to not do geo-specific defaults for distribution builds. r=markh
authorGavin Sharp <gavin@gavinsharp.com>
Mon, 29 Dec 2014 10:10:58 +1100
changeset 221457 163080209ca97b609de6b7246d44078e21627915
parent 221445 6d5a1e68f248f3e3cb54234096bd1f535dda25bd
child 221458 e17eccb249d144d28f82abd9729cd467af04d082
push id53352
push usercbook@mozilla.com
push dateMon, 29 Dec 2014 15:17:49 +0000
treeherdermozilla-inbound@8530f5b7443b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmarkh
bugs1110420
milestone37.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 1110420: need to not do geo-specific defaults for distribution builds. r=markh
toolkit/components/search/nsSearchService.js
--- a/toolkit/components/search/nsSearchService.js
+++ b/toolkit/components/search/nsSearchService.js
@@ -406,17 +406,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) {}