-
Notifications
You must be signed in to change notification settings - Fork 0
/
0001-safe_browsing-disable-reporting-of-safebrowsing-over.patch
71 lines (58 loc) · 2.32 KB
/
0001-safe_browsing-disable-reporting-of-safebrowsing-over.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
From 14babef94093ef559993bd1c4caf6417d9654993 Mon Sep 17 00:00:00 2001
From: Joachim Bauch <jojo@struktur.de>
Date: Tue, 7 Jul 2015 18:28:46 +0200
Subject: [PATCH] safe_browsing: disable reporting of safebrowsing override
Disables reporting of the safebrowsing override, i.e. the report sent
if a user decides to visit a page that was flagged as "insecure".
This prevents trk:148 (phishing) and trk:149 (malware).
---
.../browser/safe_browsing/client_side_detection_service.cc | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/chrome/browser/safe_browsing/client_side_detection_service.cc b/chrome/browser/safe_browsing/client_side_detection_service.cc
index ed6adcc2af74..caa24bb5de38 100644
--- a/chrome/browser/safe_browsing/client_side_detection_service.cc
+++ b/chrome/browser/safe_browsing/client_side_detection_service.cc
@@ -60,11 +60,13 @@ namespace {
REPORT_RESULT_MAX
};
+#if 0
void UpdateEnumUMAHistogram(MalwareReportTypes report_type) {
DCHECK(report_type >= 0 && report_type < REPORT_RESULT_MAX);
UMA_HISTOGRAM_ENUMERATION("SBClientMalware.SentReports",
report_type, REPORT_RESULT_MAX);
}
+#endif
} // namespace
@@ -269,6 +271,10 @@ void ClientSideDetectionService::StartClientReportPhishingRequest(
return;
}
+#if 1
+ if (!callback.is_null())
+ callback.Run(GURL(request->url()), false);
+#else
// Fill in metadata about which model we used.
if (is_extended_reporting) {
request->set_model_filename(model_loader_extended_->name());
@@ -346,6 +352,7 @@ void ClientSideDetectionService::StartClientReportPhishingRequest(
// Record that we made a request
phishing_report_times_.push(base::Time::Now());
+#endif
}
void ClientSideDetectionService::StartClientReportMalwareRequest(
@@ -360,6 +367,10 @@ void ClientSideDetectionService::StartClientReportMalwareRequest(
return;
}
+#if 1
+ if (!callback.is_null())
+ callback.Run(GURL(request->url()), GURL(request->url()), false);
+#else
std::string request_data;
if (!request->SerializeToString(&request_data)) {
UpdateEnumUMAHistogram(REPORT_FAILED_SERIALIZATION);
@@ -428,6 +439,7 @@ void ClientSideDetectionService::StartClientReportMalwareRequest(
// Record that we made a malware request
malware_report_times_.push(base::Time::Now());
+#endif
}
--
2.14.3