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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2506503003: Fix web accessible resource checks in ShouldAllowOpenURL for M55 (Closed)
Patch Set: Remove DWOC headers Created 4 years, 1 month 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/extensions/chrome_content_browser_client_extensions_part.h » ('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 8e3b5d16106762e948c24def0f1a5a0cb5bec8ef..f3e709a1f2d2b92bd07a0e3402e4d1ca764d07f7 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -1197,17 +1197,16 @@ bool ChromeContentBrowserClient::CanCommitURL(
bool ChromeContentBrowserClient::ShouldAllowOpenURL(
content::SiteInstance* site_instance, const GURL& url) {
- GURL from_url = site_instance->GetSiteURL();
-
#if defined(ENABLE_EXTENSIONS)
bool result;
if (ChromeContentBrowserClientExtensionsPart::ShouldAllowOpenURL(
- site_instance, from_url, url, &result))
+ site_instance, url, &result))
return result;
#endif
// Do not allow chrome://chrome-signin navigate to other chrome:// URLs, since
// the signin page may host untrusted web content.
+ GURL from_url = site_instance->GetSiteURL();
if (from_url.GetOrigin().spec() == chrome::kChromeUIChromeSigninURL &&
url.SchemeIs(content::kChromeUIScheme) &&
url.host_piece() != chrome::kChromeUIChromeSigninHost) {
« no previous file with comments | « no previous file | chrome/browser/extensions/chrome_content_browser_client_extensions_part.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698