Index: content/browser/loader/resource_loader.cc |
diff --git a/content/browser/loader/resource_loader.cc b/content/browser/loader/resource_loader.cc |
index 0a7047d32b0f3365e13d716c167fc61aab7218d6..043b8ba8f0c544f8b9423655f0e8227a8a5bd391 100644 |
--- a/content/browser/loader/resource_loader.cc |
+++ b/content/browser/loader/resource_loader.cc |
@@ -172,8 +172,10 @@ void ResourceLoader::ReportUploadProgress() { |
} |
void ResourceLoader::MarkAsTransferring(const GURL& target_url) { |
- CHECK_EQ(GetRequestInfo()->GetResourceType(), ResourceType::MAIN_FRAME) |
- << "Cannot transfer non-main frame navigations"; |
+ // TODO(creis): Why was this check here? Is it a problem for cookies? |
+ CHECK(GetRequestInfo()->GetResourceType() == ResourceType::MAIN_FRAME || |
+ GetRequestInfo()->GetResourceType() == ResourceType::SUB_FRAME) |
+ << "Can only transfer navigations"; |
is_transferring_ = true; |
// When transferring a request to another process, the renderer doesn't get |
@@ -500,34 +502,6 @@ void ResourceLoader::CompleteResponseStarted() { |
scoped_refptr<ResourceResponse> response(new ResourceResponse()); |
PopulateResourceResponse(request_.get(), response.get()); |
- // The --site-per-process flag enables an out-of-process iframes |
- // prototype. It works by changing the MIME type of cross-site subframe |
- // responses to a Chrome specific one. This new type causes the subframe |
- // to be replaced by a <webview> tag with the same URL, which results in |
- // using a renderer in a different process. |
- // |
- // For prototyping purposes, we will use a small hack to ensure same site |
- // iframes are not changed. We can compare the URL for the subframe |
- // request with the referrer. If the two don't match, then it should be a |
- // cross-site iframe. |
- // Also, we don't do the MIME type change for chrome:// URLs, as those |
- // require different privileges and are not allowed in regular renderers. |
- // |
- // The usage of SiteInstance::IsSameWebSite is safe on the IO thread, |
- // if the browser_context parameter is NULL. This does not work for hosted |
- // apps, but should be fine for prototyping. |
- // TODO(nasko): Once the SiteInstance check is fixed, ensure we do the |
- // right thing here. http://crbug.com/160576 |
- const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
- if (command_line.HasSwitch(switches::kSitePerProcess) && |
- GetRequestInfo()->GetResourceType() == ResourceType::SUB_FRAME && |
- response->head.mime_type == "text/html" && |
- !request_->url().SchemeIs(chrome::kChromeUIScheme) && |
- !SiteInstance::IsSameWebSite(NULL, request_->url(), |
- GURL(request_->referrer()))) { |
- response->head.mime_type = "application/browser-plugin"; |
- } |
- |
if (request_->ssl_info().cert.get()) { |
int cert_id = CertStore::GetInstance()->StoreCert( |
request_->ssl_info().cert.get(), info->GetChildID()); |