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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2454563003: Fix web accessible resource checks in ShouldAllowOpenURL (Closed)
Patch Set: Round 2 of Devlin's comments 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 bf57e9244712c128072a09372f3a65a50466bdbc..860a457d9e6e5961549262e95a5b8e6da01c2868 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -1191,17 +1191,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