| 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 380c077d26357ae6db44339bbbdacfe9b45692b6..8ffdf4e8a8e651f4aa17ff8dfab5d385475463dd 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,18 @@ 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.
|
| -bool WasStartedInForegroundEventInForeground(base::TimeDelta event,
|
| +bool WasStartedInForegroundEventInForeground(const base::TimeDelta& event,
|
| const PageLoadExtraInfo& info);
|
|
|
| +// TODO (@shivanisha) Since the above function is currently also called for
|
| +// TimeDelta coming over IPC (PageLoadTiming) and since Optional is not
|
| +// currently supported in IPC, thus creating another function.
|
| +// They should ideally converge to one function in the future
|
| +// when serialization framework supports Optional
|
| +bool WasStartedInForegroundOptionalEventInForeground(
|
| + const base::Optional<base::TimeDelta>& event,
|
| + const PageLoadExtraInfo& info);
|
| +
|
| } // namespace page_load_metrics
|
|
|
| #endif // COMPONENTS_PAGE_LOAD_METRICS_BROWSER_PAGE_LOAD_METRICS_UTIL_H_
|
|
|