From: Joachim Bauch <jojo@struktur.de>
Date: Tue, 7 Jul 2015 17:02:09 +0200
Subject: safe_browsing: disable incident reporting

Disables the safebrowsing incident reporting where you could upload
information about a blocked URL to Google (also added a trk prefix to
the URL so we get notified if this happens again in the future).
---
 .../safe_browsing/incident_reporting/incident_report_uploader_impl.cc  | 2 +-
 .../safe_browsing/incident_reporting/incident_reporting_service.cc     | 3 +++
 chrome/browser/safe_browsing/safe_browsing_blocking_page.cc            | 3 +--
 chrome/browser/safe_browsing/safe_browsing_service.cc                  | 2 ++
 components/security_interstitials/core/safe_browsing_loud_error_ui.cc  | 1 +
 5 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/chrome/browser/safe_browsing/incident_reporting/incident_report_uploader_impl.cc b/chrome/browser/safe_browsing/incident_reporting/incident_report_uploader_impl.cc
--- a/chrome/browser/safe_browsing/incident_reporting/incident_report_uploader_impl.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/incident_report_uploader_impl.cc
@@ -23,7 +23,7 @@ namespace safe_browsing {
 namespace {
 
 const char kSbIncidentReportUrl[] =
-    "https://sb-ssl.google.com/safebrowsing/clientreport/incident";
+    "about:blank";
 
 constexpr net::NetworkTrafficAnnotationTag
     kSafeBrowsingIncidentTrafficAnnotation =
diff --git a/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc b/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc
--- a/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc
@@ -311,11 +311,14 @@ IncidentReportingService::UploadContext::~UploadContext() {
 
 // static
 bool IncidentReportingService::IsEnabledForProfile(Profile* profile) {
+  return false;
+#if 0
   if (profile->IsOffTheRecord())
     return false;
   if (!profile->GetPrefs()->GetBoolean(prefs::kSafeBrowsingEnabled))
     return false;
   return IsExtendedReportingEnabled(*profile->GetPrefs());
+#endif
 }
 
 IncidentReportingService::IncidentReportingService(
diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
--- a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
@@ -59,8 +59,7 @@ class SafeBrowsingBlockingPageFactoryImpl
     PrefService* prefs =
         Profile::FromBrowserContext(web_contents->GetBrowserContext())
             ->GetPrefs();
-    bool is_extended_reporting_opt_in_allowed =
-        IsExtendedReportingOptInAllowed(*prefs);
+    bool is_extended_reporting_opt_in_allowed = false;
     bool is_proceed_anyway_disabled =
         prefs->GetBoolean(prefs::kSafeBrowsingProceedAnywayDisabled);
 
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.cc b/chrome/browser/safe_browsing/safe_browsing_service.cc
--- a/chrome/browser/safe_browsing/safe_browsing_service.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service.cc
@@ -359,8 +359,10 @@ SafeBrowsingUIManager* SafeBrowsingService::CreateUIManager() {
 
 void SafeBrowsingService::RegisterAllDelayedAnalysis() {
 #if defined(FULL_SAFE_BROWSING)
+#if 0
   RegisterBinaryIntegrityAnalysis();
 #endif
+#endif
 }
 
 V4ProtocolConfig SafeBrowsingService::GetV4ProtocolConfig() const {
diff --git a/components/security_interstitials/core/safe_browsing_loud_error_ui.cc b/components/security_interstitials/core/safe_browsing_loud_error_ui.cc
--- a/components/security_interstitials/core/safe_browsing_loud_error_ui.cc
+++ b/components/security_interstitials/core/safe_browsing_loud_error_ui.cc
@@ -23,6 +23,7 @@ namespace {
 // For malware interstitial pages, we link the problematic URL to Google's
 // diagnostic page.
 const char kSbDiagnosticUrl[] =
+/* trk:227 */
     "https://transparencyreport.google.com/safe-browsing/search?url=%s";
 
 // Constants for the V4 phishing string upgrades.
-- 
2.11.0

