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

Unified Diff: content/browser/loader/cross_site_resource_handler.cc

Issue 1378203002: Handle hosted apps consistently in --isolate-extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 | « chrome/browser/site_details_browsertest.cc ('k') | content/common/site_isolation_policy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/cross_site_resource_handler.cc
diff --git a/content/browser/loader/cross_site_resource_handler.cc b/content/browser/loader/cross_site_resource_handler.cc
index ea69b318796c28e90b3956cbc71143e53282e0df..7ffb659744a03ca22070a0c390e2fb18d7b86367 100644
--- a/content/browser/loader/cross_site_resource_handler.cc
+++ b/content/browser/loader/cross_site_resource_handler.cc
@@ -87,7 +87,9 @@ void OnCrossSiteResponseHelper(const CrossSiteResponseParams& params) {
}
// Returns whether a transfer is needed by doing a check on the UI thread.
-bool CheckNavigationPolicyOnUI(GURL url, int process_id, int render_frame_id) {
+bool CheckNavigationPolicyOnUI(GURL real_url,
+ int process_id,
+ int render_frame_id) {
CHECK(SiteIsolationPolicy::AreCrossProcessFramesPossible());
RenderFrameHostImpl* rfh =
RenderFrameHostImpl::FromID(process_id, render_frame_id);
@@ -105,18 +107,22 @@ bool CheckNavigationPolicyOnUI(GURL url, int process_id, int render_frame_id) {
if (web_contents->GetBrowserPluginGuest())
return false;
+ GURL effective_url = SiteInstanceImpl::GetEffectiveURL(
+ rfh->GetSiteInstance()->GetBrowserContext(), real_url);
+
// TODO(nasko, nick): These following --site-per-process checks are
// overly simplistic. Update them to match all the cases
// considered by RenderFrameHostManager::DetermineSiteInstanceForURL.
if (SiteInstance::IsSameWebSite(rfh->GetSiteInstance()->GetBrowserContext(),
- rfh->GetSiteInstance()->GetSiteURL(), url)) {
+ rfh->GetSiteInstance()->GetSiteURL(),
+ real_url)) {
return false; // The same site, no transition needed.
}
// The sites differ. If either one requires a dedicated process,
// then a transfer is needed.
return rfh->GetSiteInstance()->RequiresDedicatedProcess() ||
- SiteIsolationPolicy::DoesSiteRequireDedicatedProcess(url);
+ SiteIsolationPolicy::DoesSiteRequireDedicatedProcess(effective_url);
}
} // namespace
« no previous file with comments | « chrome/browser/site_details_browsertest.cc ('k') | content/common/site_isolation_policy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698