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

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

Issue 2111073003: Update PageLoadTiming to use base::Optional (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@optionalbug
Patch Set: remove comment Created 4 years, 5 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 b0217041ca135b3d6104a71d59838b138d8b27c8..ab8e8f1297a31031eb6514d151a3379bde84a7cf 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,31 +23,31 @@ void StaleWhileRevalidateMetricsObserver::OnCommit(
void StaleWhileRevalidateMetricsObserver::OnComplete(
const page_load_metrics::PageLoadTiming& timing,
const page_load_metrics::PageLoadExtraInfo& extra_info) {
- using page_load_metrics::WasStartedInForegroundEventInForeground;
+ using page_load_metrics::WasStartedInForegroundOptionalEventInForeground;
if (!is_interesting_domain_)
return;
- if (WasStartedInForegroundEventInForeground(timing.load_event_start,
- extra_info)) {
+ if (WasStartedInForegroundOptionalEventInForeground(timing.load_event_start,
+ extra_info)) {
PAGE_LOAD_HISTOGRAM(
"PageLoad.Clients.StaleWhileRevalidateExperiment.Timing2."
"NavigationToLoadEventFired",
- timing.load_event_start);
+ timing.load_event_start.value());
}
- if (WasStartedInForegroundEventInForeground(timing.first_layout,
- extra_info)) {
+ if (WasStartedInForegroundOptionalEventInForeground(timing.first_layout,
+ extra_info)) {
PAGE_LOAD_HISTOGRAM(
"PageLoad.Clients.StaleWhileRevalidateExperiment.Timing2."
"NavigationToFirstLayout",
- timing.first_layout);
+ timing.first_layout.value());
}
- if (WasStartedInForegroundEventInForeground(timing.first_text_paint,
- extra_info)) {
+ if (WasStartedInForegroundOptionalEventInForeground(timing.first_text_paint,
+ extra_info)) {
PAGE_LOAD_HISTOGRAM(
"PageLoad.Clients.StaleWhileRevalidateExperiment.Timing2."
"NavigationToFirstTextPaint",
- timing.first_text_paint);
+ timing.first_text_paint.value());
}
}

Powered by Google App Engine
This is Rietveld 408576698