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

Unified Diff: chrome/browser/safe_browsing/safe_browsing_blocking_page.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
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
index 266709771cc630e20de54ee52e490ef9a6829068..9535a5a36b874f3ac21315067a687a0bdba4a353 100644
--- a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
@@ -525,15 +525,10 @@ void SafeBrowsingBlockingPage::ShowBlockingPage(
// static
bool SafeBrowsingBlockingPage::IsMainPageLoadBlocked(
const UnsafeResourceList& unsafe_resources) {
- // Client-side phishing detection interstitials never block the main frame
- // load, since they happen after the page is finished loading.
- if (unsafe_resources[0].threat_type ==
- SB_THREAT_TYPE_CLIENT_SIDE_PHISHING_URL) {
- return false;
- }
-
- // Otherwise, check the threat type.
- return unsafe_resources.size() == 1 && !unsafe_resources[0].is_subresource;
+ // If there is more than one unsafe resource, the main page load must not be
+ // blocked. Otherwise, check if the one resource is.
+ return unsafe_resources.size() == 1 &&
+ unsafe_resources[0].IsMainPageLoadBlocked();
}
std::string SafeBrowsingBlockingPage::GetMetricPrefix() const {
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698