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

Unified Diff: content/browser/frame_host/navigator_impl.cc

Issue 2901643002: Remove AreCrossProcessFramesPossible from NavigatorImpl::DidNavigate (Closed)
Patch Set: Charlie's nit Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c677f372f5767093b64cb134621ef84a3f4c3e10..6f2b96f95e9c519892e5f6dbbc1a0e47b17f52b4 100644
--- a/content/browser/frame_host/navigator_impl.cc
+++ b/content/browser/frame_host/navigator_impl.cc
@@ -538,8 +538,8 @@ void NavigatorImpl::DidNavigate(
RenderFrameHostImpl* render_frame_host,
const FrameHostMsg_DidCommitProvisionalLoad_Params& params,
std::unique_ptr<NavigationHandleImpl> navigation_handle) {
- FrameTree* frame_tree = render_frame_host->frame_tree_node()->frame_tree();
- bool oopifs_possible = SiteIsolationPolicy::AreCrossProcessFramesPossible();
+ FrameTreeNode* frame_tree_node = render_frame_host->frame_tree_node();
+ FrameTree* frame_tree = frame_tree_node->frame_tree();
bool is_navigation_within_page = controller_->IsURLInPageNavigation(
params.url, params.origin, params.was_within_same_document,
@@ -549,9 +549,7 @@ void NavigatorImpl::DidNavigate(
// not a pending one.
if (is_navigation_within_page &&
render_frame_host !=
- render_frame_host->frame_tree_node()
- ->render_manager()
- ->current_frame_host()) {
+ frame_tree_node->render_manager()->current_frame_host()) {
bad_message::ReceivedBadMessage(render_frame_host->GetProcess(),
bad_message::NI_IN_PAGE_NAVIGATION);
is_navigation_within_page = false;
@@ -577,10 +575,6 @@ void NavigatorImpl::DidNavigate(
// Run tasks that must execute just before the commit.
delegate_->DidNavigateMainFramePreCommit(is_navigation_within_page);
}
-
- if (!oopifs_possible)
- frame_tree->root()->render_manager()->DidNavigateFrame(
- render_frame_host, params.gesture == NavigationGestureUser);
}
// Save the origin of the new page. Do this before calling
@@ -590,27 +584,21 @@ void NavigatorImpl::DidNavigate(
// its security context. This origin will also be sent to RenderFrameProxies
// created via mojom::Renderer::CreateView and
// mojom::Renderer::CreateFrameProxy.
- render_frame_host->frame_tree_node()->SetCurrentOrigin(
+ frame_tree_node->SetCurrentOrigin(
params.origin, params.has_potentially_trustworthy_unique_origin);
- render_frame_host->frame_tree_node()->SetInsecureRequestPolicy(
- params.insecure_request_policy);
+ frame_tree_node->SetInsecureRequestPolicy(params.insecure_request_policy);
// Navigating to a new location means a new, fresh set of http headers and/or
// <meta> elements - we need to reset CSP and Feature Policy.
if (!is_navigation_within_page) {
render_frame_host->ResetContentSecurityPolicies();
- render_frame_host->frame_tree_node()->ResetCspHeaders();
- render_frame_host->frame_tree_node()->ResetFeaturePolicyHeader();
+ frame_tree_node->ResetCspHeaders();
+ frame_tree_node->ResetFeaturePolicyHeader();
}
- // When using --site-per-process, we notify the RFHM for all navigations,
- // not just main frame navigations.
- if (oopifs_possible) {
- FrameTreeNode* frame = render_frame_host->frame_tree_node();
- frame->render_manager()->DidNavigateFrame(
- render_frame_host, params.gesture == NavigationGestureUser);
- }
+ frame_tree_node->render_manager()->DidNavigateFrame(
+ render_frame_host, params.gesture == NavigationGestureUser);
// Update the site of the SiteInstance if it doesn't have one yet, unless
// assigning a site is not necessary for this URL or the commit was for an
@@ -658,7 +646,7 @@ void NavigatorImpl::DidNavigate(
// itself. These allow GetLastCommittedURL and GetLastCommittedOrigin to
// stay correct even if the render_frame_host later becomes pending deletion.
// The URL is set regardless of whether it's for a net error or not.
- render_frame_host->frame_tree_node()->SetCurrentURL(params.url);
+ frame_tree_node->SetCurrentURL(params.url);
render_frame_host->SetLastCommittedOrigin(params.origin);
// Separately, update the frame's last successful URL except for net error
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698