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

Side by Side Diff: content/public/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: Partial fixes to Nasko's comments. 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/public/common/site_isolation_policy.h"
6
7 #include "content/public/common/content_switches.h"
8
9 namespace content {
10
11 // static
12 bool SiteIsolationPolicy::AreCrossProcessFramesPossible() {
13 return base::CommandLine::ForCurrentProcess()->HasSwitch(
14 switches::kSitePerProcess);
15 }
16
17 // static
18 bool SiteIsolationPolicy::DoesSiteRequireDedicatedProcess(const GURL& gurl) {
19 return base::CommandLine::ForCurrentProcess()->HasSwitch(
20 switches::kSitePerProcess);
21 }
22
23 // static
24 bool SiteIsolationPolicy::UseSubframeNavigationEntries() {
25 return AreCrossProcessFramesPossible();
Charlie Reis 2015/07/13 22:13:15 Why does this one call one of the others when the
26 }
27
28 // static
29 bool SiteIsolationPolicy::GuestsShouldUseCrossProcessFrames() {
30 return base::CommandLine::ForCurrentProcess()->HasSwitch(
31 switches::kSitePerProcess);
32 }
33
34 // static
35 void SiteIsolationPolicy::IsolateAllSitesForTesting(
36 base::CommandLine* command_line) {
37 command_line->AppendSwitch(switches::kSitePerProcess);
38 }
39
40 // static
41 bool SiteIsolationPolicy::AreAllSitesIsolatedForTesting() {
42 return base::CommandLine::ForCurrentProcess()->HasSwitch(
43 switches::kSitePerProcess);
44 }
45
46 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698