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

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: nasko comments 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
« no previous file with comments | « no previous file | chrome/browser/ui/login/login_prompt_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
msw 2014/08/01 17:09:47 It sounds like this could clobber or hide the firs
meacer 2014/08/01 17:25:56 Ah, good point. The assumption at the time of writ
if (is_main_frame &&
- parent_contents->GetVisibleURL().GetOrigin() != request_url.GetOrigin()) {
+ (parent_contents->GetInterstitialPage() ||
+ 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.
new LoginInterstitialDelegate(parent_contents,
request_url,
callback);
« no previous file with comments | « no previous file | chrome/browser/ui/login/login_prompt_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698