Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1681)

Unified Diff: chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_detector.cc

Issue 789613008: Remove handling of invalid but non-empty main_frame_url. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@#b1_ODID_with_history
Patch Set: merge up to r313905 Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_detector.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_detector.cc
diff --git a/chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_detector.cc b/chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_detector.cc
index 1deab62cc401720616e05d8558d0396eb2feee64..f022416b17b456da2d94f986ecea69b4ee669845 100644
--- a/chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_detector.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_detector.cc
@@ -169,20 +169,14 @@ void OffDomainInclusionDetector::BeginAnalysis(
DCHECK(main_thread_task_runner_->BelongsToCurrentThread());
if (!off_domain_inclusion_info->main_frame_url.is_valid()) {
- if (off_domain_inclusion_info->main_frame_url.is_empty()) {
- // This can happen in a few scenarios where the referrer is dropped (e.g.,
- // HTTPS => HTTP requests). Consider adding the original referrer to
- // ResourceRequestInfo if that's an issue.
- ReportAnalysisResult(off_domain_inclusion_info.Pass(),
- AnalysisEvent::ABORT_EMPTY_MAIN_FRAME_URL);
- } else {
- // There is no reason for the main frame to start loading resources if its
- // own URL is invalid but measure this in the wild to make sure.
- // TODO(gab): UMA has proven that this never happens, remove this in a
- // follow-up CL.
- ReportAnalysisResult(off_domain_inclusion_info.Pass(),
- AnalysisEvent::ABORT_INVALID_MAIN_FRAME_URL);
- }
+ // A live experiment confirmed that the only reason the |main_frame_url|
+ // would be invalid is if it's empty. The |main_frame_url| can be empty in
+ // a few scenarios where the referrer is dropped (e.g., HTTPS => HTTP
+ // requests). Consider adding the original referrer to ResourceRequestInfo
+ // if that's an issue.
+ DCHECK(off_domain_inclusion_info->main_frame_url.is_empty());
+ ReportAnalysisResult(off_domain_inclusion_info.Pass(),
+ AnalysisEvent::ABORT_EMPTY_MAIN_FRAME_URL);
return;
}
@@ -306,9 +300,6 @@ void OffDomainInclusionDetector::ReportAnalysisResult(
case AnalysisEvent::ABORT_EMPTY_MAIN_FRAME_URL:
histogram_name = "SBOffDomainInclusion.Abort.EmptyMainFrameURL";
break;
- case AnalysisEvent::ABORT_INVALID_MAIN_FRAME_URL:
- // TODO(gab): This never occurs in practice, remove the code handling it.
- break;
case AnalysisEvent::ABORT_NO_PROFILE:
histogram_name = "SBOffDomainInclusion.Abort.NoProfile";
break;
« no previous file with comments | « chrome/browser/safe_browsing/incident_reporting/off_domain_inclusion_detector.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698