OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/common/site_isolation_policy.h" | 5 #include "content/common/site_isolation_policy.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
9 #include "content/public/common/content_client.h" | 9 #include "content/public/common/content_client.h" |
10 #include "content/public/common/content_switches.h" | 10 #include "content/public/common/content_switches.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 | 66 |
67 // static | 67 // static |
68 bool SiteIsolationPolicy::UseSubframeNavigationEntries() { | 68 bool SiteIsolationPolicy::UseSubframeNavigationEntries() { |
69 // Enable the new navigation history behavior if any manner of site isolation | 69 // Enable the new navigation history behavior if any manner of site isolation |
70 // is active. | 70 // is active. |
71 return AreCrossProcessFramesPossible(); | 71 return AreCrossProcessFramesPossible(); |
72 } | 72 } |
73 | 73 |
74 // static | 74 // static |
75 bool SiteIsolationPolicy::IsSwappedOutStateForbidden() { | 75 bool SiteIsolationPolicy::IsSwappedOutStateForbidden() { |
76 return AreCrossProcessFramesPossible(); | 76 return true; |
77 } | 77 } |
78 | 78 |
79 // static | 79 // static |
80 bool SiteIsolationPolicy::IsolateAllSitesForTesting() { | 80 bool SiteIsolationPolicy::IsolateAllSitesForTesting() { |
81 // TODO(nick): Re-enable once https://crbug.com/133403 is fixed. | 81 // TODO(nick): Re-enable once https://crbug.com/133403 is fixed. |
82 // if (!(g_site_isolation_whitelist == nullptr)) return false; | 82 // if (!(g_site_isolation_whitelist == nullptr)) return false; |
83 base::CommandLine::ForCurrentProcess()->AppendSwitch( | 83 base::CommandLine::ForCurrentProcess()->AppendSwitch( |
84 switches::kSitePerProcess); | 84 switches::kSitePerProcess); |
85 return true; | 85 return true; |
86 } | 86 } |
87 | 87 |
88 } // namespace content | 88 } // namespace content |
OLD | NEW |