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 CHROME_COMMON_PAGE_LOAD_METRICS_PAGE_LOAD_TIMING_H_ | 5 #ifndef CHROME_COMMON_PAGE_LOAD_METRICS_PAGE_LOAD_TIMING_H_ |
6 #define CHROME_COMMON_PAGE_LOAD_METRICS_PAGE_LOAD_TIMING_H_ | 6 #define CHROME_COMMON_PAGE_LOAD_METRICS_PAGE_LOAD_TIMING_H_ |
7 | 7 |
8 #include "base/optional.h" | 8 #include "base/optional.h" |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
10 #include "third_party/WebKit/public/platform/WebLoadingBehaviorFlag.h" | 10 #include "third_party/WebKit/public/platform/WebLoadingBehaviorFlag.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 // Sum of times when the parser is blocked waiting on the load of a script | 70 // Sum of times when the parser is blocked waiting on the load of a script |
71 // that was inserted from document.write. This duration must be less than or | 71 // that was inserted from document.write. This duration must be less than or |
72 // equal to parse_blocked_on_script_load_duration. Note that this value may be | 72 // equal to parse_blocked_on_script_load_duration. Note that this value may be |
73 // updated multiple times during the period between parse_start and | 73 // updated multiple times during the period between parse_start and |
74 // parse_stop. Note that some uncommon cases where scripts are loaded via | 74 // parse_stop. Note that some uncommon cases where scripts are loaded via |
75 // document.write are not currently covered by this field. See crbug/600711 | 75 // document.write are not currently covered by this field. See crbug/600711 |
76 // for details. | 76 // for details. |
77 base::Optional<base::TimeDelta> | 77 base::Optional<base::TimeDelta> |
78 parse_blocked_on_script_load_from_document_write_duration; | 78 parse_blocked_on_script_load_from_document_write_duration; |
79 | 79 |
| 80 // Sum of times when the parser is executing a script. This duration takes |
| 81 // place between parser_start and parser_stop, and thus must be less than or |
| 82 // equal to parser_stop - parser_start. Note that this value may be updated |
| 83 // multiple times during the period between parse_start and parse_stop. |
| 84 base::Optional<base::TimeDelta> parse_blocked_on_script_execution_duration; |
| 85 |
| 86 // Sum of times when the parser is executing a script that was inserted from |
| 87 // document.write. This duration must be less than or equal to |
| 88 // parse_blocked_on_script_load_duration. Note that this value may be updated |
| 89 // multiple times during the period between parse_start and parse_stop. Note |
| 90 // that some uncommon cases where scripts are loaded via document.write are |
| 91 // not currently covered by this field. See crbug/600711 for details. |
| 92 base::Optional<base::TimeDelta> |
| 93 parse_blocked_on_script_execution_from_document_write_duration; |
| 94 |
80 // If you add additional members, also be sure to update operator==, | 95 // If you add additional members, also be sure to update operator==, |
81 // page_load_metrics_messages.h, and IsEmpty(). | 96 // page_load_metrics_messages.h, and IsEmpty(). |
82 }; | 97 }; |
83 | 98 |
84 struct PageLoadMetadata { | 99 struct PageLoadMetadata { |
85 PageLoadMetadata(); | 100 PageLoadMetadata(); |
86 bool operator==(const PageLoadMetadata& other) const; | 101 bool operator==(const PageLoadMetadata& other) const; |
87 // These are packed blink::WebLoadingBehaviorFlag enums. | 102 // These are packed blink::WebLoadingBehaviorFlag enums. |
88 int behavior_flags = blink::WebLoadingBehaviorNone; | 103 int behavior_flags = blink::WebLoadingBehaviorNone; |
89 }; | 104 }; |
90 | 105 |
91 } // namespace page_load_metrics | 106 } // namespace page_load_metrics |
92 | 107 |
93 #endif // CHROME_COMMON_PAGE_LOAD_METRICS_PAGE_LOAD_TIMING_H_ | 108 #endif // CHROME_COMMON_PAGE_LOAD_METRICS_PAGE_LOAD_TIMING_H_ |
OLD | NEW |