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

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

Issue 30323002: [DRAFT] Create RenderFrameHostManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 1 month 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/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());
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_impl.cc ('k') | content/browser/renderer_host/render_view_host_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698