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