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

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

Issue 53153008: Remove webview-based behavior from --site-per-process flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Initial patch. 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..291bf84fd1b33241ae30a05575318188176efb8c 100644
--- a/content/browser/loader/resource_loader.cc
+++ b/content/browser/loader/resource_loader.cc
@@ -20,12 +20,10 @@
#include "content/public/browser/cert_store.h"
#include "content/public/browser/resource_context.h"
#include "content/public/browser/resource_dispatcher_host_login_delegate.h"
-#include "content/public/browser/site_instance.h"
#include "content/public/common/content_client.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/process_type.h"
#include "content/public/common/resource_response.h"
-#include "content/public/common/url_constants.h"
#include "net/base/io_buffer.h"
#include "net/base/load_flags.h"
#include "net/http/http_response_headers.h"
@@ -500,34 +498,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/browser_plugin/browser_plugin_guest_manager.cc ('k') | content/browser/plugin_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698