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

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

Issue 2510003002: If replacing a safebrowsing interstitial, don't call DontProceed on the old one. (Closed)
Patch Set: review changes Created 4 years, 1 month 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 be5ccaa5f3ae1661f51fe63ebfac16b44dc3a7bf..9e52e196f552b1667e61a9f1e3d10d71308279af 100644
--- a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
@@ -458,19 +458,11 @@ void SafeBrowsingBlockingPage::ShowBlockingPage(
DVLOG(1) << __func__ << " " << unsafe_resource.url.spec();
WebContents* web_contents = unsafe_resource.web_contents_getter.Run();
- InterstitialPage* interstitial =
- InterstitialPage::GetInterstitialPage(web_contents);
- if (interstitial && !unsafe_resource.is_subresource) {
- // There is already an interstitial showing and we are about to display a
- // new one for the main frame. Just hide the current one, it is now
- // irrelevent
- interstitial->DontProceed();
- interstitial = NULL;
- }
-
- if (!interstitial) {
- // There are no interstitial currently showing in that tab, go ahead and
- // show this interstitial.
+ if (!InterstitialPage::GetInterstitialPage(web_contents) ||
+ !unsafe_resource.is_subresource) {
+ // There is no interstitial currently showing in that tab, or we are about
+ // to display a new one for the main frame. If there is already an
+ // interstitial, showing the new one will automatically hide the old one.
content::NavigationEntry* entry =
unsafe_resource.GetNavigationEntryForResource();
SafeBrowsingBlockingPage* blocking_page =
« 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