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

Unified Diff: chrome/browser/page_load_metrics/observers/from_gws_page_load_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/from_gws_page_load_metrics_observer.cc
diff --git a/chrome/browser/page_load_metrics/observers/from_gws_page_load_metrics_observer.cc b/chrome/browser/page_load_metrics/observers/from_gws_page_load_metrics_observer.cc
index d0a5e9812159a4b896bda66228d92a55255c6753..2a1c812d54589f2288f35f831d9645f328ac0565 100644
--- a/chrome/browser/page_load_metrics/observers/from_gws_page_load_metrics_observer.cc
+++ b/chrome/browser/page_load_metrics/observers/from_gws_page_load_metrics_observer.cc
@@ -63,44 +63,46 @@ void FromGWSPageLoadMetricsObserver::OnCommit(
void FromGWSPageLoadMetricsObserver::OnComplete(
const page_load_metrics::PageLoadTiming& timing,
const page_load_metrics::PageLoadExtraInfo& extra_info) {
- using page_load_metrics::EventOccurredInForeground;
+ using page_load_metrics::StartInForegroundEventInForeground;
if (!navigation_from_gws_)
return;
- if (EventOccurredInForeground(timing.dom_content_loaded_event_start,
+ if (StartInForegroundEventInForeground(timing.dom_content_loaded_event_start,
extra_info)) {
PAGE_LOAD_HISTOGRAM(
"PageLoad.Clients.FromGWS.Timing2."
"NavigationToDOMContentLoadedEventFired",
timing.dom_content_loaded_event_start);
}
- if (EventOccurredInForeground(timing.load_event_start, extra_info)) {
+ if (StartInForegroundEventInForeground(timing.load_event_start, extra_info)) {
PAGE_LOAD_HISTOGRAM(
"PageLoad.Clients.FromGWS.Timing2.NavigationToLoadEventFired",
timing.load_event_start);
}
- if (EventOccurredInForeground(timing.first_layout, extra_info)) {
+ if (StartInForegroundEventInForeground(timing.first_layout, extra_info)) {
PAGE_LOAD_HISTOGRAM(
"PageLoad.Clients.FromGWS.Timing2.NavigationToFirstLayout",
timing.first_layout);
}
- if (EventOccurredInForeground(timing.first_text_paint, extra_info)) {
+ if (StartInForegroundEventInForeground(timing.first_text_paint, extra_info)) {
PAGE_LOAD_HISTOGRAM(
"PageLoad.Clients.FromGWS.Timing2.NavigationToFirstTextPaint",
timing.first_text_paint);
}
- if (EventOccurredInForeground(timing.first_image_paint, extra_info)) {
+ if (StartInForegroundEventInForeground(timing.first_image_paint,
+ extra_info)) {
PAGE_LOAD_HISTOGRAM(
"PageLoad.Clients.FromGWS.Timing2.NavigationToFirstImagePaint",
timing.first_image_paint);
}
- if (EventOccurredInForeground(timing.first_paint, extra_info)) {
+ if (StartInForegroundEventInForeground(timing.first_paint, extra_info)) {
PAGE_LOAD_HISTOGRAM(
"PageLoad.Clients.FromGWS.Timing2.NavigationToFirstPaint",
timing.first_paint);
}
- if (EventOccurredInForeground(timing.first_contentful_paint, extra_info)) {
+ if (StartInForegroundEventInForeground(timing.first_contentful_paint,
+ extra_info)) {
PAGE_LOAD_HISTOGRAM(
"PageLoad.Clients.FromGWS.Timing2.NavigationToFirstContentfulPaint",
timing.first_contentful_paint);

Powered by Google App Engine
This is Rietveld 408576698