From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Mon, 12 Feb 2018 21:28:11 +0100
Subject: ungoogled-chromium: Disable untraceable URLs

Disable additional URLs that are not caught by the "trk" scheme
---
 chrome/browser/android/rlz/rlz_ping_handler.cc           | 2 +-
 chrome/browser/plugins/plugins_resource_service.cc       | 5 +----
 chrome/browser/safe_browsing/client_side_model_loader.cc | 6 ++----
 chrome/browser/safe_browsing/client_side_model_loader.h  | 1 -
 rlz/lib/financial_ping.cc                                | 4 ++--
 rlz/lib/lib_values.cc                                    | 1 -
 rlz/lib/lib_values.h                                     | 1 -
 7 files changed, 6 insertions(+), 14 deletions(-)

diff --git a/chrome/browser/android/rlz/rlz_ping_handler.cc b/chrome/browser/android/rlz/rlz_ping_handler.cc
--- a/chrome/browser/android/rlz/rlz_ping_handler.cc
+++ b/chrome/browser/android/rlz/rlz_ping_handler.cc
@@ -76,7 +76,7 @@ void RlzPingHandler::Ping(
   DCHECK_EQ(id.length(), 50u);
 
   GURL request_url(base::StringPrintf(
-      "https://%s%s?", rlz_lib::kFinancialServer, rlz_lib::kFinancialPingPath));
+      "about:blank"));
   request_url = net::AppendQueryParameter(
       request_url, rlz_lib::kProductSignatureCgiVariable, "chrome");
   request_url =
diff --git a/chrome/browser/plugins/plugins_resource_service.cc b/chrome/browser/plugins/plugins_resource_service.cc
--- a/chrome/browser/plugins/plugins_resource_service.cc
+++ b/chrome/browser/plugins/plugins_resource_service.cc
@@ -54,9 +54,6 @@ const int kStartResourceFetchDelayMs = 60 * 1000;
 // Delay between calls to update the cache 1 day and 2 minutes in testing mode.
 const int kCacheUpdateDelayMs = 24 * 60 * 60 * 1000;
 
-const char kPluginsServerUrl[] =
-    "https://www.gstatic.com/chrome/config/plugins_3/";
-
 GURL GetPluginsServerURL() {
   std::string filename;
 #if defined(OS_WIN)
@@ -71,7 +68,7 @@ GURL GetPluginsServerURL() {
 #error Unknown platform
 #endif
 
-  return GURL(kPluginsServerUrl + filename);
+  return GURL("about:blank");
 }
 
 }  // namespace
diff --git a/chrome/browser/safe_browsing/client_side_model_loader.cc b/chrome/browser/safe_browsing/client_side_model_loader.cc
--- a/chrome/browser/safe_browsing/client_side_model_loader.cc
+++ b/chrome/browser/safe_browsing/client_side_model_loader.cc
@@ -35,8 +35,6 @@ namespace safe_browsing {
 // Model Loader strings
 const size_t ModelLoader::kMaxModelSizeBytes = 150 * 1024;
 const int ModelLoader::kClientModelFetchIntervalMs = 3600 * 1000;
-const char ModelLoader::kClientModelUrlPrefix[] =
-    "https://ssl.gstatic.com/safebrowsing/csd/";
 const char ModelLoader::kClientModelNamePattern[] =
     "client_model_v5%s_variation_%d.pb";
 const char ModelLoader::kClientModelFinchExperiment[] =
@@ -90,7 +88,7 @@ ModelLoader::ModelLoader(
     scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory,
     bool is_extended_reporting)
     : name_(FillInModelName(is_extended_reporting, GetModelNumber())),
-      url_(kClientModelUrlPrefix + name_),
+      url_("about:blank"),
       update_renderers_callback_(update_renderers_callback),
       url_loader_factory_(url_loader_factory),
       weak_factory_(this) {
@@ -103,7 +101,7 @@ ModelLoader::ModelLoader(
     scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory,
     const std::string& model_name)
     : name_(model_name),
-      url_(kClientModelUrlPrefix + name_),
+      url_("about:blank"),
       update_renderers_callback_(update_renderers_callback),
       url_loader_factory_(url_loader_factory),
       weak_factory_(this) {
diff --git a/chrome/browser/safe_browsing/client_side_model_loader.h b/chrome/browser/safe_browsing/client_side_model_loader.h
--- a/chrome/browser/safe_browsing/client_side_model_loader.h
+++ b/chrome/browser/safe_browsing/client_side_model_loader.h
@@ -42,7 +42,6 @@ class ModelLoader {
   static const int kClientModelFetchIntervalMs;
   static const char kClientModelFinchExperiment[];
   static const char kClientModelFinchParam[];
-  static const char kClientModelUrlPrefix[];
   static const char kClientModelNamePattern[];
 
   // Constructs a model loader to fetch a model using |url_loader_factory|.
diff --git a/rlz/lib/financial_ping.cc b/rlz/lib/financial_ping.cc
--- a/rlz/lib/financial_ping.cc
+++ b/rlz/lib/financial_ping.cc
@@ -338,7 +338,7 @@ FinancialPing::PingResponse FinancialPing::PingServer(const char* request,
 
   // Open network connection.
   InternetHandle connection_handle = InternetConnectA(inet_handle,
-      kFinancialServer, kFinancialPort, "", "", INTERNET_SERVICE_HTTP,
+      "about:blank", kFinancialPort, "", "", INTERNET_SERVICE_HTTP,
       INTERNET_FLAG_NO_CACHE_WRITE, 0);
   if (!connection_handle)
     return PING_FAILURE;
@@ -382,7 +382,7 @@ FinancialPing::PingResponse FinancialPing::PingServer(const char* request,
   return PING_SUCCESSFUL;
 #else
   std::string url =
-      base::StringPrintf("https://%s%s", kFinancialServer, request);
+      base::StringPrintf("about:blank");
 
   // Use a waitable event to cause this function to block, to match the
   // wininet implementation.
diff --git a/rlz/lib/lib_values.cc b/rlz/lib/lib_values.cc
--- a/rlz/lib/lib_values.cc
+++ b/rlz/lib/lib_values.cc
@@ -41,7 +41,6 @@ const char kSetDccResponseVariable[] = "set_dcc";
 //
 
 const char kFinancialPingPath[] = "/tools/pso/ping";
-const char kFinancialServer[]   = "clients1.google.com";
 const int kFinancialPort = 443;
 
 // Ping times in 100-nanosecond intervals.
diff --git a/rlz/lib/lib_values.h b/rlz/lib/lib_values.h
--- a/rlz/lib/lib_values.h
+++ b/rlz/lib/lib_values.h
@@ -72,7 +72,6 @@ extern const char kSetDccResponseVariable[];
 //
 
 extern const char kFinancialPingPath[];
-extern const char kFinancialServer[];
 
 extern const int kFinancialPort;
 
-- 
2.11.0

