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

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

Issue 633083002: Changes PlzNavitate histograms to try and simplify their multi-modal characteristic. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Classify histograms from navigations issued from a previous session restore. Created 6 years, 2 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.h
diff --git a/content/browser/frame_host/navigator_impl.h b/content/browser/frame_host/navigator_impl.h
index f5c09ba7d2941273e64853384ad0447480833bb2..e0cac3ecc64178b127cc746fcbd6821d7bc60c85 100644
--- a/content/browser/frame_host/navigator_impl.h
+++ b/content/browser/frame_host/navigator_impl.h
@@ -81,9 +81,15 @@ class CONTENT_EXPORT NavigatorImpl : public Navigator {
scoped_ptr<StreamHandle> body) override;
virtual void LogResourceRequestTime(
base::TimeTicks timestamp, const GURL& url) override;
+ virtual void LogBeforeUnloadTime(
+ const base::TimeTicks& renderer_before_unload_start_time,
+ const base::TimeTicks& renderer_before_unload_end_time) override;
virtual void CancelNavigation(FrameTreeNode* frame_tree_node) override;
private:
+ // Holds data used to track browser side navigation metrics.
+ struct NavigationMetricsData;
+
friend class NavigatorTest;
virtual ~NavigatorImpl();
@@ -108,6 +114,11 @@ class CONTENT_EXPORT NavigatorImpl : public Navigator {
NavigationController::ReloadType reload_type,
base::TimeTicks navigation_start);
+ void RecordNavigationMetrics(
+ const LoadCommittedDetails& details,
+ const FrameHostMsg_DidCommitProvisionalLoad_Params& params,
+ SiteInstance* site_instance);
+
// The NavigationController that will keep track of session history for all
// RenderFrameHost objects using this NavigatorImpl.
// TODO(nasko): Move ownership of the NavigationController from
@@ -118,9 +129,7 @@ class CONTENT_EXPORT NavigatorImpl : public Navigator {
// events. Can be NULL in tests.
NavigatorDelegate* delegate_;
- // The start time and URL for latest navigation request, used for feeding a
- // few histograms under the Navigation group.
- Tuple2<base::TimeTicks, GURL> navigation_start_time_and_url;
+ scoped_ptr<NavigatorImpl::NavigationMetricsData> navigation_data_;
// PlzNavigate: used to track the various ongoing NavigationRequests in the
// different FrameTreeNodes, based on the frame_tree_node_id.

Powered by Google App Engine
This is Rietveld 408576698