summarylogtreecommitdiffstats
path: root/firefox-38-disable-location.services.mozilla.com.patch
blob: 241df5b52b913a1f972a0881f769afb2e946c1e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--- mozilla-esr38.bak/toolkit/components/search/nsSearchService.js	2015-11-05
+++ mozilla-esr38/toolkit/components/search/nsSearchService.js	2015-11-05
@@ -442,6 +442,10 @@
   if (Services.prefs.prefHasUserValue("browser.search.region")) {
     return;
   }
+  
+  // Prevent Firefox from contacting location.services.mozilla.com on a new profile
+  Services.prefs.setCharPref("browser.search.region", "US");
+  return;
 
   // If we have 'isUS' but no 'countryCode' then we are almost certainly
   // a profile from Fx 34/35 that set 'isUS' based purely on a timezone
@@ -528,6 +532,11 @@
     Services.prefs.getCharPref("browser.search.countryCode");
     return; // pref exists, so we've done this before.
   } catch(e) {}
+  
+  // No countryCode set, use US as default, don't contact location.services.mozilla.com
+  Services.prefs.setCharPref("browser.search.countryCode", "US");
+  return;
+
   // We don't have it cached, so fetch it. fetchCountryCode() will call
   // storeCountryCode if it gets a result (even if that happens after the
   // promise resolves)