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

Side by Side Diff: content/browser/frame_host/render_frame_host_manager.cc

Issue 2668013005: Turn on AreCrossProcessFramesPossible by default. (Closed)
Patch Set: Fix unit tests, find potential problems. 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/browser/frame_host/render_frame_host_manager.h" 5 #include "content/browser/frame_host/render_frame_host_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
(...skipping 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after
1091 1091
1092 bool RenderFrameHostManager::ShouldTransitionCrossSite() { 1092 bool RenderFrameHostManager::ShouldTransitionCrossSite() {
1093 // The logic below is weaker than "are all sites isolated" -- it asks instead, 1093 // The logic below is weaker than "are all sites isolated" -- it asks instead,
1094 // "is any site isolated". That's appropriate here since we're just trying to 1094 // "is any site isolated". That's appropriate here since we're just trying to
1095 // figure out if we're in any kind of site isolated mode, and in which case, 1095 // figure out if we're in any kind of site isolated mode, and in which case,
1096 // we ignore the kSingleProcess and kProcessPerTab settings. 1096 // we ignore the kSingleProcess and kProcessPerTab settings.
1097 // 1097 //
1098 // TODO(nick): Move all handling of kSingleProcess/kProcessPerTab into 1098 // TODO(nick): Move all handling of kSingleProcess/kProcessPerTab into
1099 // SiteIsolationPolicy so we have a consistent behavior around the interaction 1099 // SiteIsolationPolicy so we have a consistent behavior around the interaction
1100 // of the process model flags. 1100 // of the process model flags.
1101 // TODO(creis): This looks like it will break --single-process and
1102 // --process-per-tab.
alexmos 2017/02/04 02:03:01 Filed https://bugs.chromium.org/p/chromium/issues/
1101 if (SiteIsolationPolicy::AreCrossProcessFramesPossible()) 1103 if (SiteIsolationPolicy::AreCrossProcessFramesPossible())
1102 return true; 1104 return true;
1103 1105
1104 // False in the single-process mode, as it makes RVHs to accumulate 1106 // False in the single-process mode, as it makes RVHs to accumulate
1105 // in swapped_out_hosts_. 1107 // in swapped_out_hosts_.
1106 // True if we are using process-per-site-instance (default) or 1108 // True if we are using process-per-site-instance (default) or
1107 // process-per-site (kProcessPerSite). 1109 // process-per-site (kProcessPerSite).
1108 // TODO(nick): Move handling of kSingleProcess and kProcessPerTab into 1110 // TODO(nick): Move handling of kSingleProcess and kProcessPerTab into
1109 // SiteIsolationPolicy. 1111 // SiteIsolationPolicy.
1110 return !base::CommandLine::ForCurrentProcess()->HasSwitch( 1112 return !base::CommandLine::ForCurrentProcess()->HasSwitch(
(...skipping 1668 matching lines...) Expand 10 before | Expand all | Expand 10 after
2779 resolved_url)) { 2781 resolved_url)) {
2780 DCHECK(!dest_instance || 2782 DCHECK(!dest_instance ||
2781 dest_instance == render_frame_host_->GetSiteInstance()); 2783 dest_instance == render_frame_host_->GetSiteInstance());
2782 return false; 2784 return false;
2783 } 2785 }
2784 2786
2785 return true; 2787 return true;
2786 } 2788 }
2787 2789
2788 } // namespace content 2790 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698