| 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 1267137cd6ef55e3656feae3251a7a5c37d497d8..d7c960102728d69e361a30e9d97d6481c1596cbd 100644
|
| --- a/content/browser/loader/cross_site_resource_handler.cc
|
| +++ b/content/browser/loader/cross_site_resource_handler.cc
|
| @@ -18,6 +18,7 @@
|
| #include "content/public/browser/global_request_id.h"
|
| #include "content/public/browser/resource_controller.h"
|
| #include "content/public/common/resource_response.h"
|
| +#include "content/public/common/url_constants.h"
|
| #include "net/http/http_response_headers.h"
|
| #include "net/url_request/url_request.h"
|
|
|
| @@ -34,14 +35,9 @@ void OnCrossSiteResponseHelper(int render_view_id,
|
| int64 frame_id) {
|
| RenderViewHostImpl* rvh =
|
| RenderViewHostImpl::FromID(global_request_id.child_id, render_view_id);
|
| - if (!rvh)
|
| - return;
|
| - RenderViewHostDelegate* delegate = rvh->GetDelegate();
|
| - if (!delegate || !delegate->GetRendererManagementDelegate())
|
| - return;
|
| -
|
| - delegate->GetRendererManagementDelegate()->OnCrossSiteResponse(
|
| - rvh, global_request_id, is_transfer, transfer_url_chain, referrer,
|
| +
|
| + rvh->OnCrossSiteResponse(
|
| + global_request_id, is_transfer, transfer_url_chain, referrer,
|
| page_transition, frame_id);
|
| }
|
|
|
| @@ -95,6 +91,15 @@ bool CrossSiteResourceHandler::OnResponseStarted(
|
| bool should_transfer =
|
| GetContentClient()->browser()->ShouldSwapProcessesForRedirect(
|
| info->GetContext(), request()->original_url(), request()->url());
|
| + // TODO(creis): Always do this.
|
| + if (info->GetResourceType() == ResourceType::SUB_FRAME &&
|
| + !request()->url().SchemeIs(chrome::kChromeUIScheme) &&
|
| + !SiteInstance::IsSameWebSite(NULL, request()->url(),
|
| + GURL(request()->referrer()))) {
|
| + LOG(INFO) << "CSRH: Transferring for a cross-process subframe.";
|
| + should_transfer = true;
|
| + }
|
| +
|
| bool swap_needed = should_transfer ||
|
| CrossSiteRequestManager::GetInstance()->
|
| HasPendingCrossSiteRequest(info->GetChildID(), info->GetRouteID());
|
|
|