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

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: set TODO url for crbug.com/666172 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
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 02986de5c35d02cb9acd08d044eb4f1dd03c3b53..a7715ef3bdeca2a4d53d4c027a4ba0fa5e72c786 100644
--- a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
@@ -454,19 +454,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.
Nathan Parker 2016/11/17 20:08:24 What causes the old one to get hidden? And do we
mattm 2016/11/17 21:22:09 https://cs.chromium.org/chromium/src/content/brows
content::NavigationEntry* entry =
unsafe_resource.GetNavigationEntryForResource();
SafeBrowsingBlockingPage* blocking_page =

Powered by Google App Engine
This is Rietveld 408576698