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

Side by Side Diff: components/page_load_metrics/common/page_load_timing.h

Issue 1871393002: Add NavigationToFirstContentfulPaint UMA for ServiceWorker controlled pages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: incorporated ksakamoto's comment Created 4 years, 8 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 #ifndef COMPONENTS_PAGE_LOAD_METRICS_COMMON_PAGE_LOAD_TIMING_H_ 5 #ifndef COMPONENTS_PAGE_LOAD_METRICS_COMMON_PAGE_LOAD_TIMING_H_
6 #define COMPONENTS_PAGE_LOAD_METRICS_COMMON_PAGE_LOAD_TIMING_H_ 6 #define COMPONENTS_PAGE_LOAD_METRICS_COMMON_PAGE_LOAD_TIMING_H_
7 7
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 9
10 namespace page_load_metrics { 10 namespace page_load_metrics {
11 11
12 // PageLoadTiming contains timing metrics associated with a page load. Many of 12 // PageLoadTiming contains timing metrics associated with a page load. Many of
13 // the metrics here are based on the Navigation Timing spec: 13 // the metrics here are based on the Navigation Timing spec:
14 // http://www.w3.org/TR/navigation-timing/. 14 // http://www.w3.org/TR/navigation-timing/.
15 struct PageLoadTiming { 15 struct PageLoadTiming {
16 public: 16 public:
17 PageLoadTiming(); 17 PageLoadTiming();
18 PageLoadTiming(const PageLoadTiming& other); 18 PageLoadTiming(const PageLoadTiming& other);
19 ~PageLoadTiming(); 19 ~PageLoadTiming();
20 20
21 bool operator==(const PageLoadTiming& other) const; 21 bool operator==(const PageLoadTiming& other) const;
22 22
23 bool IsEmpty() const; 23 bool IsEmpty() const;
24 24
25 // Time that the navigation for the associated page was initiated. 25 // Time that the navigation for the associated page was initiated.
26 base::Time navigation_start; 26 base::Time navigation_start;
27 27
28 // Null when the page isn't controlled by a Service Worker. Otherwise it is
29 // the time immediately before starting the worker, or if the worker is
30 // available, it is the time immediately before sending the fetch event to
31 // the worker. This time is very close to navigation_start, so we don't use
32 // TimeDelta.
33 base::Time worker_start;
34
28 // All TimeDeltas are relative to navigation_start 35 // All TimeDeltas are relative to navigation_start
29 36
30 // Time that the first byte of the response is received. 37 // Time that the first byte of the response is received.
31 base::TimeDelta response_start; 38 base::TimeDelta response_start;
32 39
33 // Time that the document transitions to the 'loading' state. This is roughly 40 // Time that the document transitions to the 'loading' state. This is roughly
34 // the time that the HTML parser begins parsing the main HTML resource. 41 // the time that the HTML parser begins parsing the main HTML resource.
35 base::TimeDelta dom_loading; 42 base::TimeDelta dom_loading;
36 43
37 // Time immediately before the DOMContentLoaded event is fired. 44 // Time immediately before the DOMContentLoaded event is fired.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 // by this field. See crbug/600711 for details. 76 // by this field. See crbug/600711 for details.
70 base::TimeDelta parse_blocked_on_script_load_from_document_write_duration; 77 base::TimeDelta parse_blocked_on_script_load_from_document_write_duration;
71 78
72 // If you add additional members, also be sure to update operator==, 79 // If you add additional members, also be sure to update operator==,
73 // page_load_metrics_messages.h, and IsEmpty(). 80 // page_load_metrics_messages.h, and IsEmpty().
74 }; 81 };
75 82
76 } // namespace page_load_metrics 83 } // namespace page_load_metrics
77 84
78 #endif // COMPONENTS_PAGE_LOAD_METRICS_COMMON_PAGE_LOAD_TIMING_H_ 85 #endif // COMPONENTS_PAGE_LOAD_METRICS_COMMON_PAGE_LOAD_TIMING_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698