mirror of
https://github.com/morgan9e/helium
synced 2026-04-14 00:14:20 +09:00
now all chromium patches in all helium repos follow the same dir pattern: `<vendor>/<group>/<...>/<patch>` and there's no longer a "contrib" dir which was admittedly kind of confusing
110 lines
4.5 KiB
C++
110 lines
4.5 KiB
C++
From c89ce946e5328ca8a7df923d421e904bb6bfe9b6 Mon Sep 17 00:00:00 2001
|
|
From: Jan Engelhardt <jengelh@inai.de>
|
|
Date: Tue, 7 Jul 2015 18:28:46 +0200
|
|
Subject: [PATCH 63/76] 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).
|
|
---
|
|
|
|
From 4dfa8ed0814040317cb82d8545502186daa0a204 Mon Sep 17 00:00:00 2001
|
|
From: Jan Engelhardt <jengelh@inai.de>
|
|
Date: Tue, 7 Jul 2015 17:02:09 +0200
|
|
Subject: [PATCH 62/76] 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).
|
|
---
|
|
|
|
--- a/components/safe_browsing/content/browser/client_side_detection_service.cc
|
|
+++ b/components/safe_browsing/content/browser/client_side_detection_service.cc
|
|
@@ -281,6 +281,10 @@ void ClientSideDetectionService::StartCl
|
|
return;
|
|
}
|
|
|
|
+#if 1
|
|
+ if (!callback.is_null())
|
|
+ std::move(callback).Run(GURL(request->url()), false, std::nullopt, std::nullopt);
|
|
+#else
|
|
std::string request_data;
|
|
request->SerializeToString(&request_data);
|
|
|
|
@@ -363,6 +367,7 @@ void ClientSideDetectionService::StartCl
|
|
&WebUIContentInfoSingleton::AddToClientPhishingRequestsSent,
|
|
base::Unretained(WebUIContentInfoSingleton::GetInstance()),
|
|
std::move(request), access_token));
|
|
+#endif
|
|
}
|
|
|
|
void ClientSideDetectionService::HandlePhishingVerdict(
|
|
--- a/chrome/browser/safe_browsing/chrome_safe_browsing_blocking_page_factory.cc
|
|
+++ b/chrome/browser/safe_browsing/chrome_safe_browsing_blocking_page_factory.cc
|
|
@@ -64,8 +64,7 @@ ChromeSafeBrowsingBlockingPageFactory::C
|
|
Profile::FromBrowserContext(web_contents->GetBrowserContext());
|
|
// Create appropriate display options for this blocking page.
|
|
PrefService* prefs = profile->GetPrefs();
|
|
- bool is_extended_reporting_opt_in_allowed =
|
|
- IsExtendedReportingOptInAllowed(*prefs);
|
|
+ bool is_extended_reporting_opt_in_allowed = false;
|
|
bool is_proceed_anyway_disabled = IsSafeBrowsingProceedAnywayDisabled(*prefs);
|
|
|
|
// Determine if any prefs need to be updated prior to showing the security
|
|
--- a/chrome/browser/safe_browsing/incident_reporting/incident_report_uploader_impl.cc
|
|
+++ b/chrome/browser/safe_browsing/incident_reporting/incident_report_uploader_impl.cc
|
|
@@ -27,7 +27,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
|
|
kSafeBrowsingIncidentTrafficAnnotation =
|
|
--- a/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc
|
|
+++ b/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc
|
|
@@ -302,11 +302,14 @@ IncidentReportingService::UploadContext:
|
|
|
|
// static
|
|
bool IncidentReportingService::IsEnabledForProfile(Profile* profile) {
|
|
+ return false;
|
|
+#if 0
|
|
if (profile->IsOffTheRecord())
|
|
return false;
|
|
if (!IsSafeBrowsingEnabled(*profile->GetPrefs()))
|
|
return false;
|
|
return IsExtendedReportingEnabled(*profile->GetPrefs());
|
|
+#endif
|
|
}
|
|
|
|
IncidentReportingService::IncidentReportingService(
|
|
--- a/chrome/browser/safe_browsing/safe_browsing_service.cc
|
|
+++ b/chrome/browser/safe_browsing/safe_browsing_service.cc
|
|
@@ -378,7 +378,7 @@ SafeBrowsingUIManager* SafeBrowsingServi
|
|
}
|
|
|
|
void SafeBrowsingServiceImpl::RegisterAllDelayedAnalysis() {
|
|
-#if BUILDFLAG(FULL_SAFE_BROWSING)
|
|
+#if 0
|
|
RegisterBinaryIntegrityAnalysis();
|
|
#endif
|
|
}
|
|
--- a/components/security_interstitials/core/safe_browsing_loud_error_ui.cc
|
|
+++ b/components/security_interstitials/core/safe_browsing_loud_error_ui.cc
|
|
@@ -27,11 +27,11 @@ namespace {
|
|
// For malware interstitial pages, we link the problematic URL to Google's
|
|
// diagnostic page.
|
|
const char kSbDiagnosticUrl[] =
|
|
- "https://transparencyreport.google.com/safe-browsing/search?url=%s";
|
|
+ "trk:227:https://transparencyreport.google.com/safe-browsing/search?url=%s";
|
|
|
|
// Constants for the V4 phishing string upgrades.
|
|
const char kReportPhishingErrorUrl[] =
|
|
- "https://safebrowsing.google.com/safebrowsing/report_error/?url=%s";
|
|
+ "trk:228:https://safebrowsing.google.com/safebrowsing/report_error/?url=%s";
|
|
|
|
void RecordExtendedReportingPrefChanged(bool report) {
|
|
UMA_HISTOGRAM_BOOLEAN("SafeBrowsing.Pref.Extended.SecurityInterstitial",
|