Chromium Code Reviews| 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 = |