Chromium Code Reviews| 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 e400ecf3b7f1f92ca1c93e10544d4e846c16d4d9..403f957c0b7fd3974884a9cf7be31792e70849d8 100644 |
| --- a/content/browser/frame_host/navigator_impl.cc |
| +++ b/content/browser/frame_host/navigator_impl.cc |
| @@ -288,8 +288,9 @@ bool NavigatorImpl::NavigateToEntry( |
| // "Open link in new tab"). We need to keep it above RFHM::Navigate() call to |
| // capture the time needed for the RenderFrameHost initialization. |
| base::TimeTicks navigation_start = base::TimeTicks::Now(); |
| - |
| - RenderFrameHostManager* manager = frame_tree_node->render_manager(); |
| + TRACE_EVENT_INSTANT_WITH_TIMESTAMP0( |
| + "navigation", "NavigationTiming navigationStart", |
| + TRACE_EVENT_SCOPE_GLOBAL, navigation_start.ToInternalValue()); |
| // PlzNavigate: the RenderFrameHosts are no longer asked to navigate. |
| if (IsBrowserSideNavigationEnabled()) { |
| @@ -298,6 +299,18 @@ bool NavigatorImpl::NavigateToEntry( |
| RequestNavigation(frame_tree_node, dest_url, dest_referrer, frame_entry, |
| entry, reload_type, is_same_document_history_load, |
| navigation_start); |
| + if (frame_tree_node->IsMainFrame()) { |
| + TRACE_EVENT_ASYNC_BEGIN_WITH_TIMESTAMP1( |
|
clamy
2015/12/18 15:42:11
Maybe add a comment about what the handle and the
carlosk
2015/12/18 17:23:21
Done.
clamy
2015/12/21 10:43:32
I'd rather have the comment all packed together th
carlosk
2015/12/21 11:19:25
Done.
|
| + "navigation", "Navigation timeToIOStart", |
| + frame_tree_node->navigation_request()->navigation_handle(), |
| + navigation_start.ToInternalValue(), "FrameTreeNode id", |
| + frame_tree_node->frame_tree_node_id()); |
| + TRACE_EVENT_ASYNC_BEGIN_WITH_TIMESTAMP1( |
| + "navigation", "Navigation timeToCommit", |
| + frame_tree_node->navigation_request()->navigation_handle(), |
| + navigation_start.ToInternalValue(), "FrameTreeNode id", |
| + frame_tree_node->frame_tree_node_id()); |
| + } |
| // Notify observers about navigation if this is for the pending entry. |
| if (delegate_ && is_pending_entry) |
| @@ -307,7 +320,7 @@ bool NavigatorImpl::NavigateToEntry( |
| } |
| RenderFrameHostImpl* dest_render_frame_host = |
| - manager->Navigate(dest_url, frame_entry, entry); |
| + frame_tree_node->render_manager()->Navigate(dest_url, frame_entry, entry); |
| if (!dest_render_frame_host) |
| return false; // Unable to create the desired RenderFrameHost. |
| @@ -495,6 +508,12 @@ void NavigatorImpl::DidNavigate( |
| // Keep track of each frame's URL in its FrameTreeNode. |
| render_frame_host->frame_tree_node()->SetCurrentURL(params.url); |
| + if (did_navigate && render_frame_host->frame_tree_node()->IsMainFrame() && |
| + IsBrowserSideNavigationEnabled()) { |
| + TRACE_EVENT_ASYNC_END0("navigation", "Navigation timeToCommit", |
| + render_frame_host->navigation_handle()); |
| + } |
| + |
| // Send notification about committed provisional loads. This notification is |
| // different from the NAV_ENTRY_COMMITTED notification which doesn't include |
| // the actual URL navigated to and isn't sent for AUTO_SUBFRAME navigations. |