Index: content/browser/frame_host/navigation_controller_impl.cc |
diff --git a/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc |
index df3413c8d9574185287dc1862b509fc7a3c04671..bd26224b42ea345cdc85da401b6a2c3ebbc38a62 100644 |
--- a/content/browser/frame_host/navigation_controller_impl.cc |
+++ b/content/browser/frame_host/navigation_controller_impl.cc |
@@ -59,6 +59,7 @@ |
#include "content/browser/renderer_host/render_view_host_impl.h" // Temporary |
#include "content/browser/site_instance_impl.h" |
#include "content/common/frame_messages.h" |
+#include "content/common/site_isolation_policy.h" |
#include "content/common/ssl_status_serialization.h" |
#include "content/common/view_messages.h" |
#include "content/public/browser/browser_context.h" |
@@ -73,7 +74,6 @@ |
#include "content/public/browser/user_metrics.h" |
#include "content/public/common/content_client.h" |
#include "content/public/common/content_constants.h" |
-#include "content/public/common/content_switches.h" |
#include "media/base/mime_util.h" |
#include "net/base/escape.h" |
#include "net/base/net_util.h" |
@@ -737,8 +737,7 @@ void NavigationControllerImpl::LoadURLWithParams(const LoadURLParams& params) { |
// In --site-per-process, create an identical NavigationEntry with a |
// new FrameNavigationEntry for the target subframe. |
- if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
- switches::kSitePerProcess)) { |
+ if (SiteIsolationPolicy::UseSubframeNavigationEntries()) { |
entry = GetLastCommittedEntry()->Clone(); |
entry->SetPageID(-1); |
entry->AddOrUpdateFrameEntry(node, -1, -1, nullptr, params.url, |
@@ -891,8 +890,7 @@ bool NavigationControllerImpl::RendererDidNavigate( |
NavigationEntryImpl* active_entry = GetLastCommittedEntry(); |
active_entry->SetTimestamp(timestamp); |
active_entry->SetHttpStatusCode(params.http_status_code); |
- if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
- switches::kSitePerProcess)) { |
+ if (SiteIsolationPolicy::UseSubframeNavigationEntries()) { |
// Update the frame-specific PageState. |
FrameNavigationEntry* frame_entry = |
active_entry->GetFrameEntry(rfh->frame_tree_node()); |
@@ -1223,8 +1221,7 @@ void NavigationControllerImpl::RendererDidNavigateNewSubframe( |
<< "that a last committed entry exists."; |
scoped_ptr<NavigationEntryImpl> new_entry; |
- if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
- switches::kSitePerProcess)) { |
+ if (SiteIsolationPolicy::UseSubframeNavigationEntries()) { |
// Make sure new_entry takes ownership of frame_entry in a scoped_refptr. |
FrameNavigationEntry* frame_entry = new FrameNavigationEntry( |
rfh->frame_tree_node()->frame_tree_node_id(), |
@@ -1279,8 +1276,7 @@ bool NavigationControllerImpl::RendererDidNavigateAutoSubframe( |
} |
} |
- if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
- switches::kSitePerProcess)) { |
+ if (SiteIsolationPolicy::UseSubframeNavigationEntries()) { |
// This may be a "new auto" case where we add a new FrameNavigationEntry, or |
// it may be a "history auto" case where we update an existing one. |
NavigationEntryImpl* last_committed = GetLastCommittedEntry(); |
@@ -1744,8 +1740,7 @@ bool NavigationControllerImpl::NavigateToPendingEntryInternal( |
// In default Chrome, there are no subframe FrameNavigationEntries. Either |
// navigate the main frame or use the main frame's FrameNavigationEntry to |
// tell the indicated frame where to go. |
- if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
- switches::kSitePerProcess)) { |
+ if (!SiteIsolationPolicy::UseSubframeNavigationEntries()) { |
FrameNavigationEntry* frame_entry = GetPendingEntry()->GetFrameEntry(root); |
FrameTreeNode* frame = root; |
int ftn_id = GetPendingEntry()->frame_tree_node_id(); |