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

Unified Diff: chrome/browser/page_load_metrics/observers/stale_while_revalidate_metrics_observer.cc

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: chrome/browser/page_load_metrics/observers/stale_while_revalidate_metrics_observer.cc
diff --git a/chrome/browser/page_load_metrics/observers/stale_while_revalidate_metrics_observer.cc b/chrome/browser/page_load_metrics/observers/stale_while_revalidate_metrics_observer.cc
index f474d2f0f4fa6675e1cd2afde7f931eb7a256836..b0217041ca135b3d6104a71d59838b138d8b27c8 100644
--- a/chrome/browser/page_load_metrics/observers/stale_while_revalidate_metrics_observer.cc
+++ b/chrome/browser/page_load_metrics/observers/stale_while_revalidate_metrics_observer.cc
@@ -23,24 +23,27 @@ void StaleWhileRevalidateMetricsObserver::OnCommit(
void StaleWhileRevalidateMetricsObserver::OnComplete(
const page_load_metrics::PageLoadTiming& timing,
const page_load_metrics::PageLoadExtraInfo& extra_info) {
- using page_load_metrics::EventOccurredInForeground;
+ using page_load_metrics::WasStartedInForegroundEventInForeground;
if (!is_interesting_domain_)
return;
- if (EventOccurredInForeground(timing.load_event_start, extra_info)) {
+ if (WasStartedInForegroundEventInForeground(timing.load_event_start,
+ extra_info)) {
PAGE_LOAD_HISTOGRAM(
"PageLoad.Clients.StaleWhileRevalidateExperiment.Timing2."
"NavigationToLoadEventFired",
timing.load_event_start);
}
- if (EventOccurredInForeground(timing.first_layout, extra_info)) {
+ if (WasStartedInForegroundEventInForeground(timing.first_layout,
+ extra_info)) {
PAGE_LOAD_HISTOGRAM(
"PageLoad.Clients.StaleWhileRevalidateExperiment.Timing2."
"NavigationToFirstLayout",
timing.first_layout);
}
- if (EventOccurredInForeground(timing.first_text_paint, extra_info)) {
+ if (WasStartedInForegroundEventInForeground(timing.first_text_paint,
+ extra_info)) {
PAGE_LOAD_HISTOGRAM(
"PageLoad.Clients.StaleWhileRevalidateExperiment.Timing2."
"NavigationToFirstTextPaint",

Powered by Google App Engine
This is Rietveld 408576698