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

Unified Diff: content/common/site_isolation_policy.cc

Issue 1208143002: Move existing kSitePerProcess checks to a policy-oracle object (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@swapped_out_cmdline_checks
Patch Set: Attempt to fix compile. Created 5 years, 5 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/content_common.gypi » ('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
new file mode 100644
index 0000000000000000000000000000000000000000..0aae9590ce06ac8b90d894ed8c1a3abf0e77caa0
--- /dev/null
+++ b/content/common/site_isolation_policy.cc
@@ -0,0 +1,30 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/common/site_isolation_policy.h"
+
+#include "base/command_line.h"
+#include "content/public/common/content_switches.h"
+
+namespace content {
+
+// static
+bool SiteIsolationPolicy::AreCrossProcessFramesPossible() {
+ return base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kSitePerProcess);
+}
+
+// static
+bool SiteIsolationPolicy::DoesSiteRequireDedicatedProcess(const GURL& gurl) {
+ return base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kSitePerProcess);
+}
+
+// static
+bool SiteIsolationPolicy::UseSubframeNavigationEntries() {
+ return base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kSitePerProcess);
+}
+
+} // namespace content
« no previous file with comments | « content/common/site_isolation_policy.h ('k') | content/content_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698