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

Unified Diff: content/common/site_isolation_policy.cc

Issue 2831683002: Introduce support for origins that require process isolation. (Closed)
Patch Set: Charlie's comments (round 3) Created 3 years, 7 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
« no previous file with comments | « content/common/site_isolation_policy.h ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/site_isolation_policy.cc
diff --git a/content/common/site_isolation_policy.cc b/content/common/site_isolation_policy.cc
index 41c3653efcf92a764cab618011f3acffb5cab5c5..7fa66c28c826931ba4bcb2ef6b0c52dd0fa56cdf 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
@@ -42,4 +42,14 @@ bool SiteIsolationPolicy::IsTopDocumentIsolationEnabled() {
return base::FeatureList::IsEnabled(::features::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
« no previous file with comments | « content/common/site_isolation_policy.h ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698