safe_browsing-disable-incident-reporting.patch 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. From fe92c640c7e02841dcf5dbc20a5eddbd07fd7edf Mon Sep 17 00:00:00 2001
  2. From: Joachim Bauch <jojo@struktur.de>
  3. Date: Tue, 7 Jul 2015 17:02:09 +0200
  4. Subject: [PATCH 47/66] 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. .../safe_browsing/incident_reporting/incident_report_uploader_impl.cc | 2 +-
  10. .../safe_browsing/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. components/security_interstitials/core/safe_browsing_loud_error_ui.cc | 2 ++
  14. 5 files changed, 9 insertions(+), 3 deletions(-)
  15. --- a/chrome/browser/safe_browsing/incident_reporting/incident_report_uploader_impl.cc
  16. +++ b/chrome/browser/safe_browsing/incident_reporting/incident_report_uploader_impl.cc
  17. @@ -22,7 +22,7 @@ namespace safe_browsing {
  18. namespace {
  19. const char kSbIncidentReportUrl[] =
  20. - "https://sb-ssl.google.com/safebrowsing/clientreport/incident";
  21. + "trk:268:https://sb-ssl.google.com/safebrowsing/clientreport/incident";
  22. constexpr net::NetworkTrafficAnnotationTag
  23. kSafeBrowsingIncidentTrafficAnnotation =
  24. --- a/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc
  25. +++ b/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc
  26. @@ -311,11 +311,7 @@ IncidentReportingService::UploadContext:
  27. // static
  28. bool IncidentReportingService::IsEnabledForProfile(Profile* profile) {
  29. - if (profile->IsOffTheRecord())
  30. - return false;
  31. - if (!profile->GetPrefs()->GetBoolean(prefs::kSafeBrowsingEnabled))
  32. - return false;
  33. - return IsExtendedReportingEnabled(*profile->GetPrefs());
  34. + return false;
  35. }
  36. IncidentReportingService::IncidentReportingService(
  37. --- a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
  38. +++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
  39. @@ -62,8 +62,7 @@ class SafeBrowsingBlockingPageFactoryImp
  40. PrefService* prefs =
  41. Profile::FromBrowserContext(web_contents->GetBrowserContext())
  42. ->GetPrefs();
  43. - bool is_extended_reporting_opt_in_allowed =
  44. - IsExtendedReportingOptInAllowed(*prefs);
  45. + bool is_extended_reporting_opt_in_allowed = false;
  46. bool is_proceed_anyway_disabled =
  47. prefs->GetBoolean(prefs::kSafeBrowsingProceedAnywayDisabled);
  48. --- a/chrome/browser/safe_browsing/safe_browsing_service.cc
  49. +++ b/chrome/browser/safe_browsing/safe_browsing_service.cc
  50. @@ -256,7 +256,7 @@ SafeBrowsingUIManager* SafeBrowsingServi
  51. }
  52. void SafeBrowsingService::RegisterAllDelayedAnalysis() {
  53. -#if defined(FULL_SAFE_BROWSING)
  54. +#if 0
  55. RegisterBinaryIntegrityAnalysis();
  56. #endif
  57. }
  58. --- a/components/security_interstitials/core/safe_browsing_loud_error_ui.cc
  59. +++ b/components/security_interstitials/core/safe_browsing_loud_error_ui.cc
  60. @@ -22,6 +22,7 @@ namespace {
  61. // For malware interstitial pages, we link the problematic URL to Google's
  62. // diagnostic page.
  63. +// trk:228
  64. const char kSbDiagnosticUrl[] =
  65. "https://transparencyreport.google.com/safe-browsing/search?url=%s";