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

Unified Diff: chrome/browser/page_load_metrics/metrics_web_contents_observer.h

Issue 2223453003: Thread user gesture through page_load_metrics abort pipeline (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 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
« no previous file with comments | « no previous file | chrome/browser/page_load_metrics/metrics_web_contents_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/page_load_metrics/metrics_web_contents_observer.h
diff --git a/chrome/browser/page_load_metrics/metrics_web_contents_observer.h b/chrome/browser/page_load_metrics/metrics_web_contents_observer.h
index f610a277e1a9912b8834bc9bd824738935fa04bd..dcceaf495a96eae7a792c950ae288433671bbeaf 100644
--- a/chrome/browser/page_load_metrics/metrics_web_contents_observer.h
+++ b/chrome/browser/page_load_metrics/metrics_web_contents_observer.h
@@ -182,9 +182,11 @@ class PageLoadTracker {
// browser process or not. We need this to possibly clamp browser timestamp on
// a machine with inter process time tick skew.
void NotifyAbort(UserAbortType abort_type,
+ bool user_initiated,
base::TimeTicks timestamp,
bool is_certainly_browser_timestamp);
void UpdateAbort(UserAbortType abort_type,
+ bool user_initiated,
base::TimeTicks timestamp,
bool is_certainly_browser_timestamp);
@@ -219,6 +221,7 @@ class PageLoadTracker {
base::TimeTicks* event_time);
void UpdateAbortInternal(UserAbortType abort_type,
+ bool user_initiated,
base::TimeTicks timestamp,
bool is_certainly_browser_timestamp);
@@ -252,6 +255,12 @@ class PageLoadTracker {
// Will be ABORT_NONE if we have not aborted this load yet. Otherwise will
// be the first abort action the user performed.
UserAbortType abort_type_;
+
+ // This boolean is only an approximation. As the aborts pipeline is updated,
+ // more abort types will have this set to true. Currently, this is only set
+ // for navigations aborting navigations.
+ bool abort_user_initiated_;
+
base::TimeTicks abort_time_;
// We record separate metrics for events that occur after a background,
@@ -272,6 +281,10 @@ class PageLoadTracker {
int num_cache_requests_;
int num_network_requests_;
+ // This is derived from the user gesture bit in the renderer. For browser
+ // initiated navigations this will always be true.
+ bool user_gesture_;
+
// This is a subtle member. If a provisional load A gets aborted by
// provisional load B, which gets aborted by C that eventually commits, then
// there exists an abort chain of length 2, starting at A's navigation_start.
@@ -354,8 +367,9 @@ class MetricsWebContentsObserver
// Notify all loads, provisional and committed, that we performed an action
// that might abort them.
- void NotifyAbortAllLoads(UserAbortType abort_type);
+ void NotifyAbortAllLoads(UserAbortType abort_type, bool user_initiated);
void NotifyAbortAllLoadsWithTimestamp(UserAbortType abort_type,
+ bool user_initiated,
base::TimeTicks timestamp,
bool is_certainly_browser_timestamp);
« no previous file with comments | « no previous file | chrome/browser/page_load_metrics/metrics_web_contents_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698