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

Unified Diff: content/browser/site_instance_impl.cc

Issue 2399853003: [M54 merge] Lock down creation of blob:chrome-extension URLs from non-extension processes. (Closed)
Patch Set: Rebase Created 4 years, 2 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 | « content/browser/site_instance_impl.h ('k') | content/content_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/site_instance_impl.cc
diff --git a/content/browser/site_instance_impl.cc b/content/browser/site_instance_impl.cc
index 897864031ae74fa162c4d3a6e3b8a4fa2779c626..a55d786e8dbdf1cd40d30ba643cda5432aeb95f7 100644
--- a/content/browser/site_instance_impl.cc
+++ b/content/browser/site_instance_impl.cc
@@ -368,15 +368,18 @@ GURL SiteInstanceImpl::GetEffectiveURL(BrowserContext* browser_context,
// static
bool SiteInstanceImpl::DoesSiteRequireDedicatedProcess(
BrowserContext* browser_context,
- const GURL& effective_url) {
+ const GURL& url) {
// If --site-per-process is enabled, site isolation is enabled everywhere.
if (SiteIsolationPolicy::UseDedicatedProcessesForAllSites())
return true;
- // Let the content embedder enable site isolation for specific URLs.
+ // Let the content embedder enable site isolation for specific URLs. Use the
+ // canonical site url for this check, so that schemes with nested origins
+ // (blob and filesystem) work properly.
+ GURL site_url = GetSiteForURL(browser_context, url);
if (GetContentClient()->IsSupplementarySiteIsolationModeEnabled() &&
GetContentClient()->browser()->DoesSiteRequireDedicatedProcess(
- browser_context, effective_url)) {
+ browser_context, site_url)) {
return true;
}
« no previous file with comments | « content/browser/site_instance_impl.h ('k') | content/content_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698