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

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

Issue 2673963003: Prepare to turn on AreCrossProcessFramesPossible by default. (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 | « content/browser/frame_host/navigator_impl_unittest.cc ('k') | 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 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 //
1102 // TODO(creis, alexmos): This looks like it will break single-process and
1103 // process-per-tab. See https://crbug.com/688617.
1101 if (SiteIsolationPolicy::AreCrossProcessFramesPossible()) 1104 if (SiteIsolationPolicy::AreCrossProcessFramesPossible())
1102 return true; 1105 return true;
1103 1106
1104 // False in the single-process mode, as it makes RVHs to accumulate 1107 // False in the single-process mode, as it makes RVHs to accumulate
1105 // in swapped_out_hosts_. 1108 // in swapped_out_hosts_.
1106 // True if we are using process-per-site-instance (default) or 1109 // True if we are using process-per-site-instance (default) or
1107 // process-per-site (kProcessPerSite). 1110 // process-per-site (kProcessPerSite).
1108 // TODO(nick): Move handling of kSingleProcess and kProcessPerTab into 1111 // TODO(nick): Move handling of kSingleProcess and kProcessPerTab into
1109 // SiteIsolationPolicy. 1112 // SiteIsolationPolicy.
1110 return !base::CommandLine::ForCurrentProcess()->HasSwitch( 1113 return !base::CommandLine::ForCurrentProcess()->HasSwitch(
(...skipping 1668 matching lines...) Expand 10 before | Expand all | Expand 10 after
2779 resolved_url)) { 2782 resolved_url)) {
2780 DCHECK(!dest_instance || 2783 DCHECK(!dest_instance ||
2781 dest_instance == render_frame_host_->GetSiteInstance()); 2784 dest_instance == render_frame_host_->GetSiteInstance());
2782 return false; 2785 return false;
2783 } 2786 }
2784 2787
2785 return true; 2788 return true;
2786 } 2789 }
2787 2790
2788 } // namespace content 2791 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigator_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698