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

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

Issue 1384213002: Page Abort Events for relevant navigations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More events + bg/fg metrics Created 5 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: components/page_load_metrics/browser/metrics_web_contents_observer.h
diff --git a/components/page_load_metrics/browser/metrics_web_contents_observer.h b/components/page_load_metrics/browser/metrics_web_contents_observer.h
index cf39dc9bff6e66878fc7c4cdd5f3e4a02d02ff09..fbea58b0565674cffed9c421bd5fd4574928eff9 100644
--- a/components/page_load_metrics/browser/metrics_web_contents_observer.h
+++ b/components/page_load_metrics/browser/metrics_web_contents_observer.h
@@ -52,6 +52,20 @@ enum PageLoadEvent {
PAGE_LOAD_SUCCESSFUL_FIRST_LAYOUT_FOREGROUND,
PAGE_LOAD_SUCCESSFUL_FIRST_LAYOUT_BACKGROUND,
+ // The user aborted the page load before first layout, and the page is one
+ // that we would have logged first layout info from (e.g. it is http/https,
+ // not same-page, etc.).
+ PAGE_LOAD_RELEVANT_ABORTED_BEFORE_FIRST_LAYOUT,
+
+ // Counts the number of page loads started in foreground / background.
+ PAGE_LOAD_RELEVANT_STARTED_IN_FOREGROUND,
+ PAGE_LOAD_RELEVANT_STARTED_IN_BACKGROUND,
+
+ // A timing IPC was sent from the renderer that did not line up with previous
+ // data we've received (i.e. navigation start is different or the timing
+ // struct is somehow invalid).
+ PAGE_LOAD_BAD_IPC,
Randy Smith (Not in Mondays) 2015/10/06 19:24:00 I'd like the comments for these instances to make
+
// Add values before this final count.
PAGE_LOAD_LAST_ENTRY
};
@@ -62,6 +76,7 @@ class PageLoadTracker {
~PageLoadTracker();
void Commit();
void WebContentsHidden();
+ void WebContentsShown();
// Returns true if the timing was successfully updated.
bool UpdateTiming(const PageLoadTiming& timing);
@@ -76,6 +91,7 @@ class PageLoadTracker {
// because metrics like layout/paint are delayed artificially
// when they occur in the bacground.
base::TimeTicks background_time_;
+ base::TimeTicks foreground_time_;
bool started_in_foreground_;
PageLoadTiming timing_;

Powered by Google App Engine
This is Rietveld 408576698