Skip to content

Commit

Permalink
safe_browsing: disable incident reporting
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
jengelh committed Nov 14, 2023
1 parent 385e001 commit 9060c53
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ ChromeSafeBrowsingBlockingPageFactory::CreateSafeBrowsingPage(
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,11 +304,14 @@ IncidentReportingService::UploadContext::~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(
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/safe_browsing/safe_browsing_service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ SafeBrowsingUIManager* SafeBrowsingService::CreateUIManager() {
}

void SafeBrowsingService::RegisterAllDelayedAnalysis() {
#if BUILDFLAG(FULL_SAFE_BROWSING)
#if 0
RegisterBinaryIntegrityAnalysis();
#endif
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ namespace {
// For malware interstitial pages, we link the problematic URL to Google's
// diagnostic page.
const char kSbDiagnosticUrl[] =
/* trk:227 */
"https://transparencyreport.google.com/safe-browsing/search?url=%s";

// Constants for the V4 phishing string upgrades.
Expand Down

0 comments on commit 9060c53

Please sign in to comment.