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

Unified Diff: chrome/browser/safe_browsing/threat_details.cc

Issue 1488423002: Don't collect safebrowsing DOM details if the warning was main page load blocking. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove log lines Created 5 years 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
Index: chrome/browser/safe_browsing/threat_details.cc
diff --git a/chrome/browser/safe_browsing/threat_details.cc b/chrome/browser/safe_browsing/threat_details.cc
index aa361e3fba36e2fb6dd987ad23063b6ed76f0063..af89c5ccf0a2a0cd045e05e81f0f14dfbaa377fe 100644
--- a/chrome/browser/safe_browsing/threat_details.cc
+++ b/chrome/browser/safe_browsing/threat_details.cc
@@ -227,10 +227,14 @@ void ThreatDetails::StartCollection() {
if (nav_entry && !referrer_url.is_empty())
AddUrl(referrer_url, GURL(), std::string(), NULL);
- // Get URLs of frames, scripts etc from the DOM.
- // OnReceivedThreatDOMDetails will be called when the renderer replies.
- content::RenderViewHost* view = web_contents()->GetRenderViewHost();
- view->Send(new SafeBrowsingMsg_GetThreatDOMDetails(view->GetRoutingID()));
+ if (!resource_.IsMainPageLoadBlocked()) {
+ // Get URLs of frames, scripts etc from the DOM.
+ // OnReceivedThreatDOMDetails will be called when the renderer replies.
+ // TODO(mattm): In theory, if the user proceeds through the warning DOM
+ // detail collection could be started once the page loads.
+ content::RenderViewHost* view = web_contents()->GetRenderViewHost();
+ view->Send(new SafeBrowsingMsg_GetThreatDOMDetails(view->GetRoutingID()));
+ }
}
// When the renderer is done, this is called.
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc ('k') | chrome/browser/safe_browsing/ui_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698