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

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

Issue 1686643002: Add metric with time between background tab being foregrounded and the first paint (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/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 368a019d04743de746f12638a93f18c8ddbb5864..a9f66750c947dd802b1470aebeb3f15f6204b7bc 100644
--- a/components/page_load_metrics/browser/page_load_metrics_util.h
+++ b/components/page_load_metrics/browser/page_load_metrics_util.h
@@ -18,13 +18,24 @@ namespace page_load_metrics {
struct PageLoadExtraInfo;
struct PageLoadTiming;
-// 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);
+// Returns true if:
+// - We have timing information for the event.
+// - The page load started while the page was in the foreground.
+// - The event occurred prior to the page being moved to 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 StartInForegroundEventInForeground(const base::TimeDelta& event,
+ const PageLoadExtraInfo& info);
+
+
+// Returns true if:
+// - We have timing information for the event.
+// - The page load started while the page was in the background.
+// - The event occurred after the page was moved to the foreground and prior to
+// the page being moved back to the background.
+bool StartInBackgroundEventInForeground(const base::TimeDelta& event,
+ const PageLoadExtraInfo& info);
} // namespace page_load_metrics

Powered by Google App Engine
This is Rietveld 408576698