| Index: content/browser/site_instance_impl.cc
|
| diff --git a/content/browser/site_instance_impl.cc b/content/browser/site_instance_impl.cc
|
| index 8afc081c5fe98acda759c0b9a82444a08eacfa32..4209dbedac4c45d7d65456f459dbe0396cdd4cef 100644
|
| --- a/content/browser/site_instance_impl.cc
|
| +++ b/content/browser/site_instance_impl.cc
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "content/browser/site_instance_impl.h"
|
|
|
| +#include "base/command_line.h"
|
| #include "base/macros.h"
|
| #include "base/memory/ptr_util.h"
|
| #include "content/browser/browsing_instance.h"
|
| @@ -16,6 +17,7 @@
|
| #include "content/public/browser/content_browser_client.h"
|
| #include "content/public/browser/render_process_host_factory.h"
|
| #include "content/public/browser/web_ui_controller_factory.h"
|
| +#include "content/public/common/content_switches.h"
|
| #include "content/public/common/url_constants.h"
|
| #include "net/base/registry_controlled_domains/registry_controlled_domain.h"
|
|
|
| @@ -415,6 +417,14 @@ bool SiteInstanceImpl::DoesSiteRequireDedicatedProcess(
|
| // static
|
| bool SiteInstanceImpl::ShouldLockToOrigin(BrowserContext* browser_context,
|
| GURL site_url) {
|
| + // Don't lock to origin in --single-process or --process-per-tab modes, since
|
| + // these modes put cross-site pages into the same process.
|
| + if (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kSingleProcess) ||
|
| + base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kProcessPerTab))
|
| + return false;
|
| +
|
| if (!DoesSiteRequireDedicatedProcess(browser_context, site_url))
|
| return false;
|
|
|
|
|