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 #include "third_party/WebKit/public/platform/WebLoadingBehaviorFlag.h" |
9 | 10 |
10 namespace page_load_metrics { | 11 namespace page_load_metrics { |
11 | 12 |
12 // PageLoadTiming contains timing metrics associated with a page load. Many of | 13 // PageLoadTiming contains timing metrics associated with a page load. Many of |
13 // the metrics here are based on the Navigation Timing spec: | 14 // the metrics here are based on the Navigation Timing spec: |
14 // http://www.w3.org/TR/navigation-timing/. | 15 // http://www.w3.org/TR/navigation-timing/. |
15 struct PageLoadTiming { | 16 struct PageLoadTiming { |
16 public: | 17 public: |
17 PageLoadTiming(); | 18 PageLoadTiming(); |
18 PageLoadTiming(const PageLoadTiming& other); | 19 PageLoadTiming(const PageLoadTiming& other); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 // that was inserted from document.write. This duration must be less than or | 67 // that was inserted from document.write. This duration must be less than or |
67 // equal to parse_blocked_on_script_load_duration. Note that some uncommon | 68 // equal to parse_blocked_on_script_load_duration. Note that some uncommon |
68 // cases where scripts are loaded via document.write are not currently covered | 69 // cases where scripts are loaded via document.write are not currently covered |
69 // by this field. See crbug/600711 for details. | 70 // by this field. See crbug/600711 for details. |
70 base::TimeDelta parse_blocked_on_script_load_from_document_write_duration; | 71 base::TimeDelta parse_blocked_on_script_load_from_document_write_duration; |
71 | 72 |
72 // If you add additional members, also be sure to update operator==, | 73 // If you add additional members, also be sure to update operator==, |
73 // page_load_metrics_messages.h, and IsEmpty(). | 74 // page_load_metrics_messages.h, and IsEmpty(). |
74 }; | 75 }; |
75 | 76 |
| 77 struct PageLoadMetadata { |
| 78 PageLoadMetadata(); |
| 79 bool operator==(const PageLoadMetadata& other) const; |
| 80 // These are packed blink::WebLoadingBehaviorFlag enums. |
| 81 int behavior_flags = blink::WebLoadingBehaviorNone; |
| 82 }; |
| 83 |
76 } // namespace page_load_metrics | 84 } // namespace page_load_metrics |
77 | 85 |
78 #endif // COMPONENTS_PAGE_LOAD_METRICS_COMMON_PAGE_LOAD_TIMING_H_ | 86 #endif // COMPONENTS_PAGE_LOAD_METRICS_COMMON_PAGE_LOAD_TIMING_H_ |
OLD | NEW |