| 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..b80af04e44fcf08bee79c9ae99d91edc1c9bbdb0 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,26 @@ 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(
|
| + // category and name
|
| + "navigation", "Navigation timeToIOStartBeforeThrottles",
|
| + // use the NavigationHandle as the async trace id
|
| + frame_tree_node->navigation_request()->navigation_handle(),
|
| + // timestamp
|
| + navigation_start.ToInternalValue(),
|
| + // add tree node id as a parameter
|
| + "FrameTreeNode id", frame_tree_node->frame_tree_node_id());
|
| + TRACE_EVENT_ASYNC_BEGIN_WITH_TIMESTAMP1(
|
| + // category and name
|
| + "navigation", "Navigation timeToCommit",
|
| + // use the NavigationHandle as the async trace id
|
| + frame_tree_node->navigation_request()->navigation_handle(),
|
| + // timestamp
|
| + navigation_start.ToInternalValue(),
|
| + // add tree node id as a parameter
|
| + "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 +328,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 +516,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.
|
|
|