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

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

Issue 1377223002: Add page load abort metrics to PageLoadMetrics system (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@plm_backgrounded_master
Patch Set: Add unit tests Created 5 years, 3 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 45780c10314b8299d30896b9c7e4127739fec65b..908c4db72aaf71f121bbaa263b49a3b9c653266c 100644
--- a/components/page_load_metrics/browser/metrics_web_contents_observer.h
+++ b/components/page_load_metrics/browser/metrics_web_contents_observer.h
@@ -12,6 +12,7 @@
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/browser/web_contents_user_data.h"
+#include "net/base/net_errors.h"
namespace content {
class NavigationHandle;
@@ -24,6 +25,16 @@ class Message;
namespace page_load_metrics {
+enum PageLoadEvent {
+ STARTED_PROVISIONAL_LOAD,
Randy Smith (Not in Mondays) 2015/10/01 16:07:39 I'd like to have comments on these values that exp
Charlie Harrison 2015/10/01 16:59:55 Will do, good suggestions.
+ ABORTED_PROVISIONAL_LOAD,
+ ABORTED_LOAD_BEFORE_FIRST_LAYOUT,
+ SUCCESSFUL_FIRST_LAYOUT,
+
+ // Add values before this final count.
+ EVENT_COUNT
Randy Smith (Not in Mondays) 2015/10/01 16:07:39 I *think* that the custom for these is the enum na
+};
+
class PageLoadTracker {
public:
explicit PageLoadTracker(bool in_foreground);
@@ -33,6 +44,7 @@ class PageLoadTracker {
// Returns true if the timing was successfully updated.
bool UpdateTiming(const PageLoadTiming& timing);
+ void RecordEvent(PageLoadEvent event);
private:
void RecordTimingHistograms();

Powered by Google App Engine
This is Rietveld 408576698