OLD | NEW |
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(); | 19 ~PageLoadTiming(); |
19 | 20 |
20 bool operator==(const PageLoadTiming& other) const; | 21 bool operator==(const PageLoadTiming& other) const; |
21 | 22 |
22 bool IsEmpty() const; | 23 bool IsEmpty() const; |
23 | 24 |
24 // Time that the navigation for the associated page was initiated. | 25 // Time that the navigation for the associated page was initiated. |
25 base::Time navigation_start; | 26 base::Time navigation_start; |
26 | 27 |
27 // All TimeDeltas are relative to navigation_start | 28 // All TimeDeltas are relative to navigation_start |
(...skipping 23 matching lines...) Expand all Loading... |
51 // Time when the first contentful thing (image, text, etc.) is painted. | 52 // Time when the first contentful thing (image, text, etc.) is painted. |
52 base::TimeDelta first_contentful_paint; | 53 base::TimeDelta first_contentful_paint; |
53 | 54 |
54 // If you add additional members, also be sure to update operator==, | 55 // If you add additional members, also be sure to update operator==, |
55 // page_load_metrics_messages.h, and IsEmpty(). | 56 // page_load_metrics_messages.h, and IsEmpty(). |
56 }; | 57 }; |
57 | 58 |
58 } // namespace page_load_metrics | 59 } // namespace page_load_metrics |
59 | 60 |
60 #endif // COMPONENTS_PAGE_LOAD_METRICS_COMMON_PAGE_LOAD_TIMING_H_ | 61 #endif // COMPONENTS_PAGE_LOAD_METRICS_COMMON_PAGE_LOAD_TIMING_H_ |
OLD | NEW |