| 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 9159a11244b9384c12eb62cb395dddceed9f0647..3e9e712baf929cf67bd525469111ee9930a028ee 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"
|
| @@ -743,8 +743,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,
|
| @@ -897,8 +896,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());
|
| @@ -1229,8 +1227,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(),
|
| @@ -1285,8 +1282,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();
|
| @@ -1750,8 +1746,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();
|
|
|