Index: content/common/site_isolation_policy.cc |
diff --git a/content/common/site_isolation_policy.cc b/content/common/site_isolation_policy.cc |
index b3db97ede58b4a304fa8f37b0a76786b1d864658..6b6db62e8f171eef58119ed52239ff608277c3f6 100644 |
--- a/content/common/site_isolation_policy.cc |
+++ b/content/common/site_isolation_policy.cc |
@@ -19,7 +19,7 @@ bool SiteIsolationPolicy::AreCrossProcessFramesPossible() { |
// investigated. |
#if defined(OS_ANDROID) |
return UseDedicatedProcessesForAllSites() || |
- IsTopDocumentIsolationEnabled() || |
+ IsTopDocumentIsolationEnabled() || AreIsolatedOriginsEnabled() || |
alexmos
2017/05/03 23:31:08
I'm a bit sad about this, as I'd love to just enab
|
GetContentClient()->IsSupplementarySiteIsolationModeEnabled() || |
base::FeatureList::IsEnabled(::features::kGuestViewCrossProcessFrames); |
#else |
@@ -43,4 +43,14 @@ bool SiteIsolationPolicy::IsTopDocumentIsolationEnabled() { |
switches::kTopDocumentIsolation); |
} |
+// static |
+bool SiteIsolationPolicy::AreIsolatedOriginsEnabled() { |
+ // TODO(alexmos): This currently assumes that isolated origins are only added |
+ // via the command-line switch, which may not be true in the future. Remove |
+ // this function when AreCrossProcessFramesPossible becomes true on Android |
+ // above. |
+ return base::CommandLine::ForCurrentProcess()->HasSwitch( |
+ switches::kIsolateOrigins); |
+} |
+ |
} // namespace content |