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() || |
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 |
Charlie Reis
2017/05/05 23:18:51
Ooh, that's a problem for adding a public API (e.g
alexmos
2017/05/16 17:26:38
Per offline email thread, the sign-in isolation wi
|
+ // this function when AreCrossProcessFramesPossible becomes true on Android |
+ // above. |
+ return base::CommandLine::ForCurrentProcess()->HasSwitch( |
+ switches::kIsolateOrigins); |
+} |
+ |
} // namespace content |