-
Notifications
You must be signed in to change notification settings - Fork 0
/
0001-safe_browsing-disable-incident-reporting.patch
102 lines (90 loc) · 4.67 KB
/
0001-safe_browsing-disable-incident-reporting.patch
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
From 79e28a814048319577d495225686112afcedb0be Mon Sep 17 00:00:00 2001
From: Joachim Bauch <jojo@struktur.de>
Date: Tue, 7 Jul 2015 17:02:09 +0200
Subject: [PATCH] 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).
---
.../incident_reporting/incident_report_uploader_impl.cc | 2 +-
.../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 ++
.../security_interstitials/core/safe_browsing_loud_error_ui.cc | 10 +++++++++-
5 files changed, 16 insertions(+), 4 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
index 5b344d2943f4..341198aaf4b0 100644
--- a/chrome/browser/safe_browsing/incident_reporting/incident_report_uploader_impl.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/incident_report_uploader_impl.cc
@@ -21,7 +21,7 @@ namespace safe_browsing {
namespace {
const char kSbIncidentReportUrl[] =
- "https://sb-ssl.google.com/safebrowsing/clientreport/incident";
+ "trk:268:https://sb-ssl.google.com/safebrowsing/clientreport/incident";
constexpr net::NetworkTrafficAnnotationTag kTrafficAnnotation =
net::DefineNetworkTrafficAnnotation("safe_browsing_incident", R"(
diff --git a/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc b/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc
index 6b704cd9850f..5c8246b70427 100644
--- a/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc
@@ -309,11 +309,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
index f72a65663d34..8938f546a5cc 100644
--- a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
@@ -65,8 +65,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
index 4f990d6a9414..93bf3754a63b 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service.cc
@@ -316,8 +316,10 @@ SafeBrowsingDatabaseManager* SafeBrowsingService::CreateDatabaseManager() {
void SafeBrowsingService::RegisterAllDelayedAnalysis() {
#if defined(FULL_SAFE_BROWSING)
+#if 0
RegisterBinaryIntegrityAnalysis();
#endif
+#endif
}
SafeBrowsingProtocolConfig SafeBrowsingService::GetProtocolConfig() 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
index ca910948cf97..816591c0725c 100644
--- a/components/security_interstitials/core/safe_browsing_loud_error_ui.cc
+++ b/components/security_interstitials/core/safe_browsing_loud_error_ui.cc
@@ -22,8 +22,16 @@ namespace {
// For malware interstitial pages, we link the problematic URL to Google's
// diagnostic page.
+#if defined(GOOGLE_CHROME_BUILD)
+// trk:227
const char kSbDiagnosticUrl[] =
- "https://transparencyreport.google.com/safe-browsing/search?url=%s";
+ "https://www.google.com/safebrowsing/"
+ "diagnostic?site=%s&client=googlechrome";
+#else
+// trk:228
+const char kSbDiagnosticUrl[] =
+ "https://www.google.com/safebrowsing/diagnostic?site=%s&client=chromium";
+#endif
// Constants for the V4 phishing string upgrades.
const char kReportPhishingErrorUrl[] =
--
2.14.3