OLD | NEW |
(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(); |
| 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 |
OLD | NEW |