firefox-patches/disable-locationservice.patch

25 lines
1.0 KiB
Diff
Raw Permalink Normal View History

2017-09-20 19:13:30 +02:00
--- a/toolkit/components/search/nsSearchService.js
+++ b/toolkit/components/search/nsSearchService.js
2017-11-20 20:14:25 +01:00
@@ -380,6 +380,10 @@
2017-09-20 19:13:30 +02:00
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
// check. If this said they were US, we force region to be US.
2017-11-20 20:14:25 +01:00
@@ -463,6 +467,10 @@
2017-09-20 19:13:30 +02:00
// If we have a country-code already stored in our prefs we trust it.
let countryCode = Services.prefs.getCharPref("browser.search.countryCode", "");
+ // No countryCode set, use US as default, don't contact location.services.mozilla.com
+ Services.prefs.setCharPref("browser.search.countryCode", "US");
+ return;
+
if (!countryCode) {
// We don't have it cached, so fetch it. fetchCountryCode() will call
// storeCountryCode if it gets a result (even if that happens after the