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

Unified Diff: chrome/browser/ui/login/login_prompt.cc

Issue 397453002: Add test case to see if HTTP auth interstitials work nicely with other interstitials (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Better name for test case Created 6 years, 5 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
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);

Powered by Google App Engine
This is Rietveld 408576698