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

Side by Side Diff: content/common/site_isolation_policy.cc

Issue 2687943002: Turn off SiteIsolationPolicy::AreCrossProcessFramesPossible for Android. (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "content/public/common/content_switches.h" 8 #include "content/public/common/content_switches.h"
9 9
10 namespace content { 10 namespace content {
11 11
12 // static 12 // static
13 bool SiteIsolationPolicy::AreCrossProcessFramesPossible() { 13 bool SiteIsolationPolicy::AreCrossProcessFramesPossible() {
14 // Before turning this on for Android, input event routing needs to be
15 // completed there, and perf regressions in https://crbug.com/690229 need to be
16 // investigated.
17 #if defined(OS_ANDROID)
18 return false;
nasko 2017/02/09 21:05:25 Shouldn't this be the old code that we removed? It
alexmos 2017/02/09 21:42:31 Indeed! Thanks for catching, and I'm glad the bot
19 #else
14 return true; 20 return true;
21 #endif
15 } 22 }
16 23
17 // static 24 // static
18 bool SiteIsolationPolicy::UseDedicatedProcessesForAllSites() { 25 bool SiteIsolationPolicy::UseDedicatedProcessesForAllSites() {
19 return base::CommandLine::ForCurrentProcess()->HasSwitch( 26 return base::CommandLine::ForCurrentProcess()->HasSwitch(
20 switches::kSitePerProcess); 27 switches::kSitePerProcess);
21 } 28 }
22 29
23 // static 30 // static
24 bool SiteIsolationPolicy::IsTopDocumentIsolationEnabled() { 31 bool SiteIsolationPolicy::IsTopDocumentIsolationEnabled() {
25 // --site-per-process trumps --top-document-isolation. 32 // --site-per-process trumps --top-document-isolation.
26 if (UseDedicatedProcessesForAllSites()) 33 if (UseDedicatedProcessesForAllSites())
27 return false; 34 return false;
28 35
29 return base::CommandLine::ForCurrentProcess()->HasSwitch( 36 return base::CommandLine::ForCurrentProcess()->HasSwitch(
30 switches::kTopDocumentIsolation); 37 switches::kTopDocumentIsolation);
31 } 38 }
32 39
33 } // namespace content 40 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698