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 ea9f921fc4de728d55746b0e285e3ddcd0d517ff..7332dc49ffb32b812413c0c6f6a85368591cc377 100644 |
--- a/content/browser/frame_host/navigator_impl.cc |
+++ b/content/browser/frame_host/navigator_impl.cc |
@@ -5,6 +5,7 @@ |
#include "content/browser/frame_host/navigator_impl.h" |
#include "base/command_line.h" |
+#include "base/metrics/histogram.h" |
#include "base/time/time.h" |
#include "content/browser/frame_host/frame_tree.h" |
#include "content/browser/frame_host/frame_tree_node.h" |
@@ -341,7 +342,6 @@ 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(); |
- |
clamy
2014/09/19 14:56:03
Did you remove the line on purpose? I think it is
carlosk
2014/09/23 17:02:56
Done. It was not on purpose: I did changes in this
|
FrameMsg_Navigate_Params navigate_params; |
RenderFrameHostManager* manager = |
render_frame_host->frame_tree_node()->render_manager(); |
@@ -351,6 +351,8 @@ bool NavigatorImpl::NavigateToEntry( |
// node. |
if (CommandLine::ForCurrentProcess()->HasSwitch( |
switches::kEnableBrowserSideNavigation)) { |
+ navigation_start_time_ = navigation_start; |
+ navigation_start_url_ = entry.GetURL(); |
// Create the navigation parameters. |
MakeNavigateParams( |
entry, *controller_, reload_type, navigation_start, &navigate_params); |
@@ -388,6 +390,8 @@ bool NavigatorImpl::NavigateToEntry( |
navigate_params.transferred_request_child_id == |
dest_render_frame_host->GetProcess()->GetID(); |
if (!is_transfer_to_same) { |
+ navigation_start_time_ = navigation_start; |
+ navigation_start_url_ = entry.GetURL(); |
dest_render_frame_host->Navigate(navigate_params); |
} else { |
// No need to navigate again. Just resume the deferred request. |
@@ -666,6 +670,14 @@ void NavigatorImpl::CommitNavigation( |
// renderer. |
} |
+void NavigatorImpl::LogResourceRequestTime( |
+ base::TimeTicks timestamp, GURL url) { |
+ if (navigation_start_url_ == url) { |
davidben
2014/09/19 21:52:45
This is slightly racy, but there's not really much
carlosk
2014/09/23 17:02:57
Yes! I was from the start looking for a "request_i
|
+ base::TimeDelta time_to_network = timestamp - navigation_start_time_; |
+ LOCAL_HISTOGRAM_TIMES("PlzNavigate.TimeToNetworkRequest", time_to_network); |
clamy
2014/09/19 14:56:03
You want a UMA_HISTOGRAM_TIMES, otherwise we will
carlosk
2014/09/23 17:02:56
Done! My bad!
|
+ } |
+} |
+ |
void NavigatorImpl::CheckWebUIRendererDoesNotDisplayNormalURL( |
RenderFrameHostImpl* render_frame_host, |
const GURL& url) { |