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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 890183002: Allow Signin page to open other chrome:// URLs if login content in <webview> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Middle ground Created 5 years, 10 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 | extensions/browser/guest_view/web_view/web_view_guest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index cf63aa7cf1ec233a8427de64bbba0c5e8ce9d4c0..0c15c4634cae01e2ea326529239a6b5c5523d6b1 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -1053,8 +1053,11 @@ bool ChromeContentBrowserClient::ShouldAllowOpenURL(
#endif
// Do not allow chrome://chrome-signin navigate to other chrome:// URLs, since
- // the signin page may host untrusted web content.
- if (from_url.GetOrigin().spec() == chrome::kChromeUIChromeSigninURL &&
+ // the signin page may host untrusted web content when <webview>-based signin
+ // is not enabled. In the <webview> case, untrusted content is out-of-process
+ // and cannot navigate to chrome:// URLs.
+ if (!switches::IsEnableWebviewBasedSignin() &&
Charlie Reis 2015/02/04 22:02:57 I'm still hesitant to change this. It sounds like
+ from_url.GetOrigin().spec() == chrome::kChromeUIChromeSigninURL &&
url.SchemeIs(content::kChromeUIScheme) &&
url.host() != chrome::kChromeUIChromeSigninHost) {
VLOG(1) << "Blocked navigation to " << url.spec() << " from "
« no previous file with comments | « no previous file | extensions/browser/guest_view/web_view/web_view_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698