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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 | 65 |
66 // static | 66 // static |
67 bool SiteIsolationPolicy::UseSubframeNavigationEntries() { | 67 bool SiteIsolationPolicy::UseSubframeNavigationEntries() { |
68 // Enable the new navigation history behavior if any manner of site isolation | 68 // Enable the new navigation history behavior if any manner of site isolation |
69 // is active. | 69 // is active. |
70 return AreCrossProcessFramesPossible(); | 70 return AreCrossProcessFramesPossible(); |
71 } | 71 } |
72 | 72 |
73 // static | 73 // static |
74 bool SiteIsolationPolicy::IsSwappedOutStateForbidden() { | 74 bool SiteIsolationPolicy::IsSwappedOutStateForbidden() { |
75 // TODO(nasko): Fix Android issues and remove this ifdef. | |
76 #if defined(OS_ANDROID) | |
77 return AreCrossProcessFramesPossible(); | 75 return AreCrossProcessFramesPossible(); |
78 #else | |
79 return true; | |
80 #endif | |
81 } | 76 } |
82 | 77 |
83 // static | 78 // static |
84 bool SiteIsolationPolicy::IsolateAllSitesForTesting() { | 79 bool SiteIsolationPolicy::IsolateAllSitesForTesting() { |
85 // TODO(nick): Re-enable once https://crbug.com/133403 is fixed. | 80 // TODO(nick): Re-enable once https://crbug.com/133403 is fixed. |
86 // if (!(g_site_isolation_whitelist == nullptr)) return false; | 81 // if (!(g_site_isolation_whitelist == nullptr)) return false; |
87 base::CommandLine::ForCurrentProcess()->AppendSwitch( | 82 base::CommandLine::ForCurrentProcess()->AppendSwitch( |
88 switches::kSitePerProcess); | 83 switches::kSitePerProcess); |
89 return true; | 84 return true; |
90 } | 85 } |
91 | 86 |
92 } // namespace content | 87 } // namespace content |
OLD | NEW |