safe_browsing-disable-incident-reporting.patch 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. From 4dfa8ed0814040317cb82d8545502186daa0a204 Mon Sep 17 00:00:00 2001
  2. From: Jan Engelhardt <jengelh@inai.de>
  3. Date: Tue, 7 Jul 2015 17:02:09 +0200
  4. Subject: [PATCH 62/76] safe_browsing: disable incident reporting
  5. Disables the safebrowsing incident reporting where you could upload
  6. information about a blocked URL to Google (also added a trk prefix to
  7. the URL so we get notified if this happens again in the future).
  8. ---
  9. .../incident_reporting/incident_report_uploader_impl.cc | 2 +-
  10. .../incident_reporting/incident_reporting_service.cc | 3 +++
  11. chrome/browser/safe_browsing/safe_browsing_blocking_page.cc | 3 +--
  12. chrome/browser/safe_browsing/safe_browsing_service.cc | 2 +-
  13. .../security_interstitials/core/safe_browsing_loud_error_ui.cc | 1 +
  14. 5 files changed, 7 insertions(+), 4 deletions(-)
  15. --- a/chrome/browser/safe_browsing/chrome_safe_browsing_blocking_page_factory.cc
  16. +++ b/chrome/browser/safe_browsing/chrome_safe_browsing_blocking_page_factory.cc
  17. @@ -63,8 +63,7 @@ ChromeSafeBrowsingBlockingPageFactory::C
  18. Profile::FromBrowserContext(web_contents->GetBrowserContext());
  19. // Create appropriate display options for this blocking page.
  20. PrefService* prefs = profile->GetPrefs();
  21. - bool is_extended_reporting_opt_in_allowed =
  22. - IsExtendedReportingOptInAllowed(*prefs);
  23. + bool is_extended_reporting_opt_in_allowed = false;
  24. bool is_proceed_anyway_disabled = IsSafeBrowsingProceedAnywayDisabled(*prefs);
  25. // Determine if any prefs need to be updated prior to showing the security
  26. --- a/chrome/browser/safe_browsing/incident_reporting/incident_report_uploader_impl.cc
  27. +++ b/chrome/browser/safe_browsing/incident_reporting/incident_report_uploader_impl.cc
  28. @@ -27,7 +27,7 @@ namespace safe_browsing {
  29. namespace {
  30. const char kSbIncidentReportUrl[] =
  31. - "https://sb-ssl.google.com/safebrowsing/clientreport/incident";
  32. + "trk:268:https://sb-ssl.google.com/safebrowsing/clientreport/incident";
  33. constexpr net::NetworkTrafficAnnotationTag
  34. kSafeBrowsingIncidentTrafficAnnotation =
  35. --- a/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc
  36. +++ b/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc
  37. @@ -306,11 +306,14 @@ IncidentReportingService::UploadContext:
  38. // static
  39. bool IncidentReportingService::IsEnabledForProfile(Profile* profile) {
  40. + return false;
  41. +#if 0
  42. if (profile->IsOffTheRecord())
  43. return false;
  44. if (!IsSafeBrowsingEnabled(*profile->GetPrefs()))
  45. return false;
  46. return IsExtendedReportingEnabled(*profile->GetPrefs());
  47. +#endif
  48. }
  49. IncidentReportingService::IncidentReportingService(
  50. --- a/chrome/browser/safe_browsing/safe_browsing_service.cc
  51. +++ b/chrome/browser/safe_browsing/safe_browsing_service.cc
  52. @@ -373,7 +373,7 @@ SafeBrowsingUIManager* SafeBrowsingServi
  53. }
  54. void SafeBrowsingServiceImpl::RegisterAllDelayedAnalysis() {
  55. -#if BUILDFLAG(FULL_SAFE_BROWSING)
  56. +#if 0
  57. RegisterBinaryIntegrityAnalysis();
  58. #endif
  59. }
  60. --- a/components/security_interstitials/core/safe_browsing_loud_error_ui.cc
  61. +++ b/components/security_interstitials/core/safe_browsing_loud_error_ui.cc
  62. @@ -27,11 +27,11 @@ namespace {
  63. // For malware interstitial pages, we link the problematic URL to Google's
  64. // diagnostic page.
  65. const char kSbDiagnosticUrl[] =
  66. - "https://transparencyreport.google.com/safe-browsing/search?url=%s";
  67. + "trk:227:https://transparencyreport.google.com/safe-browsing/search?url=%s";
  68. // Constants for the V4 phishing string upgrades.
  69. const char kReportPhishingErrorUrl[] =
  70. - "https://safebrowsing.google.com/safebrowsing/report_error/?url=%s";
  71. + "trk:228:https://safebrowsing.google.com/safebrowsing/report_error/?url=%s";
  72. void RecordExtendedReportingPrefChanged(bool report) {
  73. UMA_HISTOGRAM_BOOLEAN("SafeBrowsing.Pref.Extended.SecurityInterstitial",