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 #include "third_party/WebKit/public/platform/WebLoadingBehaviorFlag.h" |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 | 21 |
22 bool operator==(const PageLoadTiming& other) const; | 22 bool operator==(const PageLoadTiming& other) const; |
23 | 23 |
24 bool IsEmpty() const; | 24 bool IsEmpty() const; |
25 | 25 |
26 // Time that the navigation for the associated page was initiated. | 26 // Time that the navigation for the associated page was initiated. |
27 base::Time navigation_start; | 27 base::Time navigation_start; |
28 | 28 |
29 // All TimeDeltas are relative to navigation_start | 29 // All TimeDeltas are relative to navigation_start |
30 | 30 |
| 31 // TODO(shivanisha): Issue 596367 shows that it is possible for a valid |
| 32 // TimeDelta value to be 0 (2 TimeTicks can have the same value even if they |
| 33 // were assigned in separate instructions if the clock speed is less |
| 34 // granular). The solution there was to use base::Optional for those values. |
| 35 // Consider changing the below values to Optional as well when serialization |
| 36 // supports it. |
| 37 |
31 // Time that the first byte of the response is received. | 38 // Time that the first byte of the response is received. |
32 base::TimeDelta response_start; | 39 base::TimeDelta response_start; |
33 | 40 |
34 // Time that the document transitions to the 'loading' state. This is roughly | 41 // Time that the document transitions to the 'loading' state. This is roughly |
35 // the time that the HTML parser begins parsing the main HTML resource. | 42 // the time that the HTML parser begins parsing the main HTML resource. |
36 base::TimeDelta dom_loading; | 43 base::TimeDelta dom_loading; |
37 | 44 |
38 // Time immediately before the DOMContentLoaded event is fired. | 45 // Time immediately before the DOMContentLoaded event is fired. |
39 base::TimeDelta dom_content_loaded_event_start; | 46 base::TimeDelta dom_content_loaded_event_start; |
40 | 47 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 struct PageLoadMetadata { | 84 struct PageLoadMetadata { |
78 PageLoadMetadata(); | 85 PageLoadMetadata(); |
79 bool operator==(const PageLoadMetadata& other) const; | 86 bool operator==(const PageLoadMetadata& other) const; |
80 // These are packed blink::WebLoadingBehaviorFlag enums. | 87 // These are packed blink::WebLoadingBehaviorFlag enums. |
81 int behavior_flags = blink::WebLoadingBehaviorNone; | 88 int behavior_flags = blink::WebLoadingBehaviorNone; |
82 }; | 89 }; |
83 | 90 |
84 } // namespace page_load_metrics | 91 } // namespace page_load_metrics |
85 | 92 |
86 #endif // COMPONENTS_PAGE_LOAD_METRICS_COMMON_PAGE_LOAD_TIMING_H_ | 93 #endif // COMPONENTS_PAGE_LOAD_METRICS_COMMON_PAGE_LOAD_TIMING_H_ |
OLD | NEW |