Chromium Code Reviews| Index: chrome/browser/ui/login/login_prompt.cc |
| diff --git a/chrome/browser/ui/login/login_prompt.cc b/chrome/browser/ui/login/login_prompt.cc |
| index 53f68a7b4a8f518502bdf7c005e1aaa274b15769..4af671385261a87cffa45481aa9a662b763e28d5 100644 |
| --- a/chrome/browser/ui/login/login_prompt.cc |
| +++ b/chrome/browser/ui/login/login_prompt.cc |
| @@ -509,15 +509,21 @@ void LoginDialogCallback(const GURL& request_url, |
| return; |
| } |
| + // For main frame navigations, show a blank interstitial if this is a cross |
| + // origin request or if there is an existing interstitial. |
| if (is_main_frame && |
| - parent_contents->GetVisibleURL().GetOrigin() != request_url.GetOrigin()) { |
| + (parent_contents->GetInterstitialPage() || |
|
nasko
2014/07/17 14:08:44
Is it correct that we hit this only after proceedi
meacer
2014/07/17 22:08:18
I can't think of any other state where an intersti
|
| + parent_contents->GetVisibleURL().GetOrigin() != request_url.GetOrigin()) |
| + ) { |
| // Show a blank interstitial for main-frame, cross origin requests |
| // so that the correct URL is shown in the omnibox. |
| base::Closure callback = base::Bind(&ShowLoginPrompt, |
| request_url, |
| make_scoped_refptr(auth_info), |
| make_scoped_refptr(handler)); |
| - // This is owned by the interstitial it creates. |
| + |
| + // This is owned by the interstitial it creates. The new interstitial will |
| + // replace existing interstitial, if any. |
|
nasko
2014/07/17 14:08:44
I don't recall the ownership semantics of this. Wo
meacer
2014/07/17 22:08:18
Interstitials clean up themselves on navigation. S
|
| new LoginInterstitialDelegate(parent_contents, |
| request_url, |
| callback); |