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 c79612e2a32672bf2b69be034c65cce48af2839d..66dc3aa7119f2cfc5dbba22b6032092d94ce1a78 100644 |
--- a/components/page_load_metrics/browser/page_load_metrics_util.h |
+++ b/components/page_load_metrics/browser/page_load_metrics_util.h |
@@ -6,6 +6,7 @@ |
#define COMPONENTS_PAGE_LOAD_METRICS_BROWSER_PAGE_LOAD_METRICS_UTIL_H_ |
#include "base/metrics/histogram_macros.h" |
+#include "base/optional.h" |
#include "base/time/time.h" |
#define PAGE_LOAD_HISTOGRAM(name, sample) \ |
@@ -25,9 +26,16 @@ struct PageLoadTiming; |
// 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. |
+// If the event time delta and background time delta are equal, we still |
+// consider the event to be logged in the foreground histogram since any |
+// background specific handling would not yet have been applied to that event. |
bool WasStartedInForegroundEventInForeground(base::TimeDelta event, |
const PageLoadExtraInfo& info); |
+bool WasStartedInForegroundOptionalEventInForeground( |
+ const base::Optional<base::TimeDelta>& event, |
+ const PageLoadExtraInfo& info); |
+ |
// Returns true if: |
// - Parse started and did not complete but the entire page load duration |
// happened in the foreground. |
@@ -35,7 +43,6 @@ bool WasStartedInForegroundEventInForeground(base::TimeDelta event, |
bool WasParseInForeground(base::TimeDelta parse_start, |
base::TimeDelta parse_stop, |
const PageLoadExtraInfo& info); |
- |
} // namespace page_load_metrics |
#endif // COMPONENTS_PAGE_LOAD_METRICS_BROWSER_PAGE_LOAD_METRICS_UTIL_H_ |