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. |