From 0143513a7ec9760176d83bbab29369026e75d9b3 Mon Sep 17 00:00:00 2001
From: grizzlyuser <grizzlyuser@protonmail.com>
Date: Sun, 4 Apr 2021 13:09:05 +0300
Subject: [PATCH 1/2] geolocation: Disable API and remove Google API URLs

The idea for Iceweasel is to reference only services which can be
self-hosted using 100% free software stack.

At the moment, upstream uses Google Geolocation API by default for
release builds. There's also a special configuration for Nightly and
early Beta builds to use Mozilla Location Services.

Since I couldn't find the source code of Google Geolocation API, let's
assume it's nonfree. So removed the URLs.

Mozilla Location Services need further evaluation. But as we don't ship
Nightly or Beta builds and strive to stick as close to upstream as
possible while keeping the SW stack 100% free, release builds don't have
any valid geolocation provider, so let's disable geolocation API by
default for now.
---
 modules/libpref/init/StaticPrefList.yaml | 2 +-
 modules/libpref/init/all.js              | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml
index f9befc42b4..2d8f509a1a 100644
--- a/modules/libpref/init/StaticPrefList.yaml
+++ b/modules/libpref/init/StaticPrefList.yaml
@@ -4112,7 +4112,7 @@
 # Is support for Navigator.geolocation enabled?
 - name: geo.enabled
   type: bool
-  value: true
+  value: false
   mirror: always
 
 # Time, in milliseconds, to wait for the location provider to spin up.
diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js
index c7cde8917c..26b724350f 100644
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -3791,13 +3791,13 @@ pref("network.psl.onUpdate_notify", false);
 // All the Geolocation preferences are here.
 //
 #ifndef EARLY_BETA_OR_EARLIER
-  pref("geo.provider.network.url", "https://www.googleapis.com/geolocation/v1/geolocate?key=%GOOGLE_LOCATION_SERVICE_API_KEY%");
+  pref("geo.provider.network.url", "");
 #else
   // Use MLS on Nightly and early Beta.
   pref("geo.provider.network.url", "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%");
   // On Nightly and early Beta, make duplicate location services requests
   // to google so we can compare results.
-  pref("geo.provider.network.compare.url", "https://www.googleapis.com/geolocation/v1/geolocate?key=%GOOGLE_LOCATION_SERVICE_API_KEY%");
+  pref("geo.provider.network.compare.url", "");
 #endif
 
 // Timeout to wait before sending the location request.
-- 
2.31.1


From 3442b524f614edad5461ceaa44a5c8640815765a Mon Sep 17 00:00:00 2001
From: grizzlyuser <grizzlyuser@protonmail.com>
Date: Sun, 4 Apr 2021 13:49:05 +0300
Subject: [PATCH 2/2] Disable banners and remove URLs for mobile apps on
 about:protections page

---
 browser/app/profile/firefox.js | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js
index ef44a16daa..2feabdc67f 100644
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -1756,15 +1756,15 @@ pref("browser.contentblocking.report.monitor.enabled", true);
 pref("browser.contentblocking.report.proxy.enabled", false);
 
 // Disable the mobile promotion by default.
-pref("browser.contentblocking.report.show_mobile_app", true);
+pref("browser.contentblocking.report.show_mobile_app", false);
 
 // Enable the vpn card by default.
-pref("browser.contentblocking.report.vpn.enabled", true);
+pref("browser.contentblocking.report.vpn.enabled", false);
 // Only show vpn card to certain regions. Comma separated string of two letter ISO 3166-1 country codes.
 pref("browser.contentblocking.report.vpn_regions", "us,ca,nz,sg,my,gb,de,fr");
 // Comma separated string of mozilla vpn supported platforms.
 pref("browser.contentblocking.report.vpn_platforms", "win,mac,linux");
-pref("browser.contentblocking.report.hide_vpn_banner", false);
+pref("browser.contentblocking.report.hide_vpn_banner", true);
 pref("browser.contentblocking.report.vpn_sub_id", "sub_HrfCZF7VPHzZkA");
 
 pref("browser.contentblocking.report.monitor.url", "https://monitor.firefox.com/?entrypoint=protection_report_monitor&utm_source=about-protections");
@@ -1775,12 +1775,12 @@ pref("browser.contentblocking.report.monitor.home_page_url", "https://monitor.fi
 pref("browser.contentblocking.report.manage_devices.url", "https://accounts.firefox.com/settings/clients");
 pref("browser.contentblocking.report.endpoint_url", "https://monitor.firefox.com/user/breach-stats?includeResolved=true");
 pref("browser.contentblocking.report.proxy_extension.url", "https://fpn.firefox.com/browser?utm_source=firefox-desktop&utm_medium=referral&utm_campaign=about-protections&utm_content=about-protections");
-pref("browser.contentblocking.report.mobile-ios.url", "https://apps.apple.com/app/firefox-private-safe-browser/id989804926");
-pref("browser.contentblocking.report.mobile-android.url", "https://play.google.com/store/apps/details?id=org.mozilla.firefox&referrer=utm_source%3Dprotection_report%26utm_content%3Dmobile_promotion");
-pref("browser.contentblocking.report.vpn.url", "https://vpn.mozilla.org/?utm_source=firefox-browser&utm_medium=firefox-browser&utm_campaign=about-protections-card");
-pref("browser.contentblocking.report.vpn-promo.url", "https://vpn.mozilla.org/?utm_source=firefox-browser&utm_medium=firefox-browser&utm_campaign=about-protections-top-promo");
-pref("browser.contentblocking.report.vpn-android.url", "https://play.google.com/store/apps/details?id=org.mozilla.firefox.vpn&referrer=utm_source%3Dfirefox-browser%26utm_medium%3Dfirefox-browser%26utm_campaign%3Dabout-protections-mobile-vpn%26anid%3D--");
-pref("browser.contentblocking.report.vpn-ios.url", "https://apps.apple.com/us/app/firefox-private-network-vpn/id1489407738");
+pref("browser.contentblocking.report.mobile-ios.url", "");
+pref("browser.contentblocking.report.mobile-android.url", "");
+pref("browser.contentblocking.report.vpn.url", "");
+pref("browser.contentblocking.report.vpn-promo.url", "");
+pref("browser.contentblocking.report.vpn-android.url", "");
+pref("browser.contentblocking.report.vpn-ios.url", "");
 
 // Protection Report's SUMO urls
 pref("browser.contentblocking.report.lockwise.how_it_works.url", "https://support.mozilla.org/1/firefox/%VERSION%/%OS%/%LOCALE%/password-manager-report");
-- 
2.31.1

