Chromium Code Reviews| Index: content/common/site_isolation_policy.cc |
| diff --git a/content/common/site_isolation_policy.cc b/content/common/site_isolation_policy.cc |
| index 694c9db3336be49465f81223f9f2f49e70575a07..a0b33ab6aa4666c5274e117d94a764322181dfb4 100644 |
| --- a/content/common/site_isolation_policy.cc |
| +++ b/content/common/site_isolation_policy.cc |
| @@ -15,8 +15,8 @@ namespace content { |
| // static |
| bool SiteIsolationPolicy::AreCrossProcessFramesPossible() { |
| - return base::CommandLine::ForCurrentProcess()->HasSwitch( |
| - switches::kSitePerProcess) || |
| + return UseDedicatedProcessesForAllSites() || |
| + IsTopDocumentIsolationEnabled() || |
| GetContentClient()->IsSupplementarySiteIsolationModeEnabled() || |
| BrowserPluginGuestMode::UseCrossProcessFramesForGuests(); |
| } |
| @@ -28,6 +28,16 @@ bool SiteIsolationPolicy::UseDedicatedProcessesForAllSites() { |
| } |
| // static |
| +bool SiteIsolationPolicy::IsTopDocumentIsolationEnabled() { |
| + // --site-per-process trumps --isolate-top-document. |
|
Charlie Reis
2016/03/25 19:47:13
nit: --top-document-isolation
This reminds me-- i
ncarter (slow)
2016/03/28 22:00:29
I'm not sure about the tryjobs, but I was planning
Charlie Reis
2016/03/29 17:17:12
Sounds good. We'll also be running your test clas
|
| + if (UseDedicatedProcessesForAllSites()) |
| + return false; |
| + |
| + return base::CommandLine::ForCurrentProcess()->HasSwitch( |
| + switches::kTopDocumentIsolation); |
| +} |
| + |
| +// static |
| bool SiteIsolationPolicy::UseSubframeNavigationEntries() { |
| // Enable the new navigation history behavior if any manner of site isolation |
| // is active. |