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

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

Issue 1183513003: Ignore queued Safe Browsing interstitial requests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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/safe_browsing_blocking_page.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/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 a11bee0daff5609fa135a2eb87a99435a71169af..4b27b01335f03a622d5dc2d39860dc7ae8fb45fe 100644
--- a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
@@ -80,9 +80,6 @@ const char kEventNameHarmful[] = "harmful_interstitial_";
const char kEventNamePhishing[] = "phishing_interstitial_";
const char kEventNameOther[] = "safebrowsing_other_interstitial_";
-base::LazyInstance<SafeBrowsingBlockingPage::UnsafeResourceMap>
- g_unsafe_resource_map = LAZY_INSTANCE_INITIALIZER;
-
} // namespace
// static
@@ -324,25 +321,6 @@ void SafeBrowsingBlockingPage::OnProceed() {
FinishMalwareDetails(malware_details_proceed_delay_ms_);
NotifySafeBrowsingUIManager(ui_manager_, unsafe_resources_, true);
-
- // Check to see if some new notifications of unsafe resources have been
- // received while we were showing the interstitial.
- UnsafeResourceMap* unsafe_resource_map = GetUnsafeResourcesMap();
- UnsafeResourceMap::iterator iter = unsafe_resource_map->find(web_contents());
- SafeBrowsingBlockingPage* blocking_page = NULL;
- if (iter != unsafe_resource_map->end() && !iter->second.empty()) {
- // Build an interstitial for all the unsafe resources notifications.
- // Don't show it now as showing an interstitial while an interstitial is
- // already showing would cause DontProceed() to be invoked.
- blocking_page = factory_->CreateSafeBrowsingPage(ui_manager_,
- web_contents(),
- iter->second);
- unsafe_resource_map->erase(iter);
- }
-
- // Now that this interstitial is gone, we can show the new one.
- if (blocking_page)
- blocking_page->Show();
}
content::InterstitialPageDelegate::TypeID
@@ -370,15 +348,6 @@ void SafeBrowsingBlockingPage::OnDontProceed() {
NotifySafeBrowsingUIManager(ui_manager_, unsafe_resources_, false);
- // The user does not want to proceed, clear the queued unsafe resources
- // notifications we received while the interstitial was showing.
- UnsafeResourceMap* unsafe_resource_map = GetUnsafeResourcesMap();
- UnsafeResourceMap::iterator iter = unsafe_resource_map->find(web_contents());
- if (iter != unsafe_resource_map->end() && !iter->second.empty()) {
- NotifySafeBrowsingUIManager(ui_manager_, iter->second, false);
- unsafe_resource_map->erase(iter);
- }
-
// We don't remove the navigation entry if the tab is being destroyed as this
// would trigger a navigation that would cause trouble as the render view host
// for the tab has by then already been destroyed. We also don't delete the
@@ -427,12 +396,6 @@ void SafeBrowsingBlockingPage::NotifySafeBrowsingUIManager(
}
// static
-SafeBrowsingBlockingPage::UnsafeResourceMap*
- SafeBrowsingBlockingPage::GetUnsafeResourcesMap() {
- return g_unsafe_resource_map.Pointer();
-}
-
-// static
SafeBrowsingBlockingPage* SafeBrowsingBlockingPage::CreateBlockingPage(
SafeBrowsingUIManager* ui_manager,
WebContents* web_contents,
@@ -472,10 +435,6 @@ void SafeBrowsingBlockingPage::ShowBlockingPage(
blocking_page->Show();
return;
}
-
- // This is an interstitial for a page's resource, let's queue it.
- UnsafeResourceMap* unsafe_resource_map = GetUnsafeResourcesMap();
- (*unsafe_resource_map)[web_contents].push_back(unsafe_resource);
}
// static
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_blocking_page.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698