Index: content/browser/frame_host/navigator_impl.cc |
diff --git a/content/browser/frame_host/navigator_impl.cc b/content/browser/frame_host/navigator_impl.cc |
index b5d31369efca8643be54f111442b1b4e374f9069..a417c0e2c4321ed59e5cc37c22606371e03efcff 100644 |
--- a/content/browser/frame_host/navigator_impl.cc |
+++ b/content/browser/frame_host/navigator_impl.cc |
@@ -36,6 +36,7 @@ |
#include "content/public/common/content_client.h" |
#include "content/public/common/content_switches.h" |
#include "content/public/common/resource_response.h" |
+#include "content/public/common/site_isolation_policy.h" |
#include "content/public/common/url_constants.h" |
#include "content/public/common/url_utils.h" |
#include "net/base/net_errors.h" |
@@ -71,8 +72,7 @@ FrameMsg_Navigate_Type::Value GetNavigationType( |
} |
RenderFrameHostManager* GetRenderManager(RenderFrameHostImpl* rfh) { |
- if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
- switches::kSitePerProcess)) |
+ if (SiteIsolationPolicy::AreCrossProcessFramesPossible()) |
return rfh->frame_tree_node()->render_manager(); |
return rfh->frame_tree_node()->frame_tree()->root()->render_manager(); |
@@ -352,8 +352,7 @@ void NavigatorImpl::DidNavigate( |
const FrameHostMsg_DidCommitProvisionalLoad_Params& input_params) { |
FrameHostMsg_DidCommitProvisionalLoad_Params params(input_params); |
FrameTree* frame_tree = render_frame_host->frame_tree_node()->frame_tree(); |
- bool use_site_per_process = base::CommandLine::ForCurrentProcess()->HasSwitch( |
- switches::kSitePerProcess); |
+ bool oopifs_possible = SiteIsolationPolicy::AreCrossProcessFramesPossible(); |
if (ui::PageTransitionIsMainFrame(params.transition)) { |
if (delegate_) { |
@@ -378,7 +377,7 @@ void NavigatorImpl::DidNavigate( |
delegate_->DidNavigateMainFramePreCommit(is_navigation_within_page); |
} |
- if (!use_site_per_process) |
+ if (!oopifs_possible) |
frame_tree->root()->render_manager()->DidNavigateFrame( |
render_frame_host, params.gesture == NavigationGestureUser); |
} |
@@ -393,7 +392,7 @@ void NavigatorImpl::DidNavigate( |
// When using --site-per-process, we notify the RFHM for all navigations, |
// not just main frame navigations. |
- if (use_site_per_process) { |
+ if (oopifs_possible) { |
FrameTreeNode* frame = render_frame_host->frame_tree_node(); |
frame->render_manager()->DidNavigateFrame( |
render_frame_host, params.gesture == NavigationGestureUser); |
@@ -544,10 +543,8 @@ void NavigatorImpl::RequestTransferURL( |
// Send the navigation to the current FrameTreeNode if it's destined for a |
// subframe in the current tab. We'll assume it's for the main frame |
// (possibly of a new or different WebContents) otherwise. |
- if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
- switches::kSitePerProcess) && |
- disposition == CURRENT_TAB && |
- render_frame_host->GetParent()) { |
+ if (SiteIsolationPolicy::AreCrossProcessFramesPossible() && |
+ disposition == CURRENT_TAB && render_frame_host->GetParent()) { |
frame_tree_node_id = |
render_frame_host->frame_tree_node()->frame_tree_node_id(); |
} |