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

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

Issue 1476503004: [page_load_metrics] User Initiated Abort Tracking (Observer version) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@new_observer
Patch Set: Don't clear provisional loads on RenderProcessGone Created 5 years 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/page_load_metrics_util.h
diff --git a/components/page_load_metrics/browser/page_load_metrics_util.h b/components/page_load_metrics/browser/page_load_metrics_util.h
index 0865bfa74aba86297d01cb89c8a785da9b31257b..17b5686d7c8d172c641c28e1858450cdedeefd89 100644
--- a/components/page_load_metrics/browser/page_load_metrics_util.h
+++ b/components/page_load_metrics/browser/page_load_metrics_util.h
@@ -7,6 +7,7 @@
#include "base/metrics/histogram_macros.h"
#include "base/time/time.h"
+#include "components/page_load_metrics/browser/page_load_metrics_observer.h"
#define PAGE_LOAD_HISTOGRAM(name, sample) \
UMA_HISTOGRAM_CUSTOM_TIMES(name, sample, \
@@ -23,13 +24,13 @@ struct PageLoadTiming;
// Painting of a background color is not considered 'contentful'.
base::TimeDelta GetFirstContentfulPaint(const PageLoadTiming& timing);
-// Returns false for events for which we have no timing information, and events
-// that happened on a page that had been in the background. When a page is
-// backgrounded, some events (e.g. paint) are delayed. Since these data points
-// can skew the mean, they should not be mixed with timing events that occurred
-// in the foreground.
-bool EventOccurredInForeground(const base::TimeDelta& event,
- const PageLoadExtraInfo& info);
+// Input is a TimeDelta assumed to be baselined at navigation start. Returns
+// false for zero durations, and durations that happened on a page that had been
+// in the background. When a page is backgrounded, some events (e.g. paint) are
+// delayed. Since these data points can skew the mean, they should not be mixed
+// with timing events that occurred in the foreground.
+bool DurationOccurredInForeground(const base::TimeDelta& event,
kinuko 2015/12/11 12:24:27 I have a feeling that this change is not really re
kinuko 2015/12/11 13:16:45 Some more nit comments in case you want to land th
Charlie Harrison 2015/12/11 14:12:20 I'm fine doing this in another patch. We can figur
Bryan McQuade 2015/12/11 14:13:42 Yeah - doing this in a separate change sounds fine
Charlie Harrison 2015/12/11 14:49:11 Yep, my most recent patch set does not include thi
+ const PageLoadExtraInfo& info);
} // namespace page_load_metrics

Powered by Google App Engine
This is Rietveld 408576698