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

Side by Side Diff: chrome/browser/page_load_metrics/observers/stale_while_revalidate_metrics_observer.cc

Issue 1817263003: Allow TimeTicks for serialized page load operations to be equal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add param Created 4 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/page_load_metrics/observers/stale_while_revalidate_metr ics_observer.h" 5 #include "chrome/browser/page_load_metrics/observers/stale_while_revalidate_metr ics_observer.h"
6 6
7 #include "components/page_load_metrics/browser/page_load_metrics_util.h" 7 #include "components/page_load_metrics/browser/page_load_metrics_util.h"
8 #include "components/page_load_metrics/common/page_load_timing.h" 8 #include "components/page_load_metrics/common/page_load_timing.h"
9 #include "content/public/browser/navigation_handle.h" 9 #include "content/public/browser/navigation_handle.h"
10 #include "net/base/stale_while_revalidate_experiment_domains.h" 10 #include "net/base/stale_while_revalidate_experiment_domains.h"
(...skipping 10 matching lines...) Expand all
21 } 21 }
22 22
23 void StaleWhileRevalidateMetricsObserver::OnComplete( 23 void StaleWhileRevalidateMetricsObserver::OnComplete(
24 const page_load_metrics::PageLoadTiming& timing, 24 const page_load_metrics::PageLoadTiming& timing,
25 const page_load_metrics::PageLoadExtraInfo& extra_info) { 25 const page_load_metrics::PageLoadExtraInfo& extra_info) {
26 using page_load_metrics::WasStartedInForegroundEventInForeground; 26 using page_load_metrics::WasStartedInForegroundEventInForeground;
27 27
28 if (!is_interesting_domain_) 28 if (!is_interesting_domain_)
29 return; 29 return;
30 30
31 if (WasStartedInForegroundEventInForeground(timing.load_event_start, 31 if (WasStartedInForegroundEventInForeground(timing.load_event_start, false,
32 extra_info)) { 32 extra_info)) {
33 PAGE_LOAD_HISTOGRAM( 33 PAGE_LOAD_HISTOGRAM(
34 "PageLoad.Clients.StaleWhileRevalidateExperiment.Timing2." 34 "PageLoad.Clients.StaleWhileRevalidateExperiment.Timing2."
35 "NavigationToLoadEventFired", 35 "NavigationToLoadEventFired",
36 timing.load_event_start); 36 timing.load_event_start);
37 } 37 }
38 if (WasStartedInForegroundEventInForeground(timing.first_layout, 38 if (WasStartedInForegroundEventInForeground(timing.first_layout, false,
39 extra_info)) { 39 extra_info)) {
40 PAGE_LOAD_HISTOGRAM( 40 PAGE_LOAD_HISTOGRAM(
41 "PageLoad.Clients.StaleWhileRevalidateExperiment.Timing2." 41 "PageLoad.Clients.StaleWhileRevalidateExperiment.Timing2."
42 "NavigationToFirstLayout", 42 "NavigationToFirstLayout",
43 timing.first_layout); 43 timing.first_layout);
44 } 44 }
45 if (WasStartedInForegroundEventInForeground(timing.first_text_paint, 45 if (WasStartedInForegroundEventInForeground(timing.first_text_paint, false,
46 extra_info)) { 46 extra_info)) {
47 PAGE_LOAD_HISTOGRAM( 47 PAGE_LOAD_HISTOGRAM(
48 "PageLoad.Clients.StaleWhileRevalidateExperiment.Timing2." 48 "PageLoad.Clients.StaleWhileRevalidateExperiment.Timing2."
49 "NavigationToFirstTextPaint", 49 "NavigationToFirstTextPaint",
50 timing.first_text_paint); 50 timing.first_text_paint);
51 } 51 }
52 } 52 }
53 53
54 } // namespace chrome 54 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698