| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 | 60 |
| 60 // Sum of times when the parser is blocked waiting on the load of a script. | 61 // Sum of times when the parser is blocked waiting on the load of a script. |
| 61 // This duration takes place between parser_start and parser_stop, and thus | 62 // This duration takes place between parser_start and parser_stop, and thus |
| 62 // must be less than or equal to parser_stop - parser_start. | 63 // must be less than or equal to parser_stop - parser_start. |
| 63 base::TimeDelta parse_blocked_on_script_load_duration; | 64 base::TimeDelta parse_blocked_on_script_load_duration; |
| 64 | 65 |
| 65 // If you add additional members, also be sure to update operator==, | 66 // If you add additional members, also be sure to update operator==, |
| 66 // page_load_metrics_messages.h, and IsEmpty(). | 67 // page_load_metrics_messages.h, and IsEmpty(). |
| 67 }; | 68 }; |
| 68 | 69 |
| 70 struct PageLoadMetadata { |
| 71 PageLoadMetadata(); |
| 72 bool operator==(const PageLoadMetadata& other) const; |
| 73 // These are packed blink::WebLoadingBehaviorFlag enums. |
| 74 int behavior_flags = blink::WebLoadingBehaviorNone; |
| 75 }; |
| 76 |
| 69 } // namespace page_load_metrics | 77 } // namespace page_load_metrics |
| 70 | 78 |
| 71 #endif // COMPONENTS_PAGE_LOAD_METRICS_COMMON_PAGE_LOAD_TIMING_H_ | 79 #endif // COMPONENTS_PAGE_LOAD_METRICS_COMMON_PAGE_LOAD_TIMING_H_ |
| OLD | NEW |