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

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

Issue 172063002: Unify frame IDs with RenderFrameHost routing IDs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix type Created 6 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 side-by-side diff with in-line comments
Download patch
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 f01dc531fca5073272ebf8e64a56d9a65e265bc1..40a3d59c013fbc4e77a55bedf6fefe5a2296a8ff 100644
--- a/content/browser/frame_host/navigator_impl.cc
+++ b/content/browser/frame_host/navigator_impl.cc
@@ -383,15 +383,6 @@ void NavigatorImpl::DidNavigate(
RenderViewHostImpl* rvh = render_frame_host->render_view_host();
bool use_site_per_process =
CommandLine::ForCurrentProcess()->HasSwitch(switches::kSitePerProcess);
- if (frame_tree->IsFirstNavigationAfterSwap()) {
- // First navigation should be a main frame navigation.
- // TODO(creis): This DCHECK is currently disabled for --site-per-process
- // because cross-process subframe navigations still have a main frame
- // PageTransition.
- if (!use_site_per_process)
- DCHECK(PageTransitionIsMainFrame(params.transition));
- frame_tree->OnFirstNavigationAfterSwap(params.frame_id);
- }
// When using --site-per-process, look up the FrameTreeNode ID that the
// renderer-specific frame ID corresponds to.
@@ -474,7 +465,11 @@ void NavigatorImpl::DidNavigate(
// For now, keep track of each frame's URL in its FrameTreeNode. This lets
// us estimate our process count for implementing OOP iframes.
// TODO(creis): Remove this when we track which pages commit in each frame.
- frame_tree->SetFrameUrl(params.frame_id, params.url);
+ FrameTreeNode* node =
+ frame_tree->FindByRoutingID(params.frame_id,
+ render_frame_host->GetProcess()->GetID());
+ if (node)
+ node->set_current_url(params.url);
// Send notification about committed provisional loads. This notification is
// different from the NAV_ENTRY_COMMITTED notification which doesn't include
« no previous file with comments | « content/browser/frame_host/frame_tree_unittest.cc ('k') | content/browser/frame_host/render_frame_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698