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

Unified Diff: content/common/site_isolation_policy.cc

Issue 2831683002: Introduce support for origins that require process isolation. (Closed)
Patch Set: Rebase Created 3 years, 8 months 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/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

Powered by Google App Engine
This is Rietveld 408576698