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

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

Issue 410373003: Fix cross origin check when deciding to show the HTTP auth interstitial. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test 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..ca60fdaa7d663c5b2f344a3d1358e573a42a169c 100644
--- a/chrome/browser/ui/login/login_prompt.cc
+++ b/chrome/browser/ui/login/login_prompt.cc
@@ -510,7 +510,10 @@ void LoginDialogCallback(const GURL& request_url,
}
if (is_main_frame &&
- parent_contents->GetVisibleURL().GetOrigin() != request_url.GetOrigin()) {
+ (parent_contents->GetVisibleURL().GetOrigin() !=
+ request_url.GetOrigin() ||
+ parent_contents->GetLastCommittedURL().GetOrigin() !=
+ request_url.GetOrigin())) {
Peter Kasting 2014/08/05 20:18:10 It seems a bit weird that we check both of these.
meacer 2014/08/05 22:29:19 The two different cases are: 1- The user navigate
Peter Kasting 2014/08/05 23:15:34 I would probably change to just checking against G
meacer 2014/08/05 23:32:23 Done.
// 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,
« 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