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

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: Created 5 years, 11 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 | no next file » | 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 b6e6de5ecbbf505c069ddec6b2190416543aff33..396dccc30a6072135100e5e8c5dc462689bcad13 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -1021,8 +1021,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 unless <webview>-based
Charlie Reis 2015/02/02 17:29:21 This comment is a bit hard to follow. Maybe: ...
Fady Samuel 2015/02/02 19:59:07 Done.
+ // signin is enabled. In this case, untrusted content cannot directly access
+ // other chrome:// URLs.
+ if (!switches::IsEnableWebviewBasedSignin() &&
+ 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 | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698