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

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

Issue 30323002: [DRAFT] Create RenderFrameHostManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Misc fixes Created 7 years 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
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 8fb1c410bdccd935a147e33ffef68b4bd347a55e..9c22c0815a47e3f43d1b24f645d6b7ad1f73e719 100644
--- a/content/browser/loader/cross_site_resource_handler.cc
+++ b/content/browser/loader/cross_site_resource_handler.cc
@@ -127,10 +127,13 @@ bool CrossSiteResourceHandler::OnResponseStarted(
// cross-site subframe navigations.
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSitePerProcess)) {
GURL referrer(request()->referrer());
- // We skip this for WebUI processes for now, since pages like the NTP host
- // cross-site WebUI iframes but don't have referrers.
+ // We skip this for WebUI and NTP processes for now, since pages like
+ // Settings and the NTP host cross-site WebUI iframes but don't have
+ // referrers. (Note: the NTP is not WebUI anymore.)
bool is_webui_process = ChildProcessSecurityPolicyImpl::GetInstance()->
- HasWebUIBindings(info->GetChildID());
+ HasWebUIBindings(info->GetChildID()) ||
+ request()->url().SchemeIs(chrome::kChromeUIScheme) ||
+ request()->url().SchemeIs("chrome-search");
// TODO(creis): This shouldn't rely on the referrer to determine the parent
// frame's URL. This also doesn't work for hosted apps, due to passing NULL
@@ -140,6 +143,8 @@ bool CrossSiteResourceHandler::OnResponseStarted(
if (info->GetResourceType() == ResourceType::SUB_FRAME &&
!is_webui_process &&
!SiteInstance::IsSameWebSite(NULL, request()->url(), referrer)) {
+ LOG(INFO) << "CSRH: Transferring for a cross-process subframe: " <<
+ request()->url();
should_transfer = true;
}
}
« no previous file with comments | « content/browser/frame_host/render_frame_host_manager.cc ('k') | content/browser/renderer_host/render_view_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698