Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Side by Side Diff: components/page_load_metrics/common/page_load_timing.h

Issue 1837233002: Optional <TimeDelta> since they may be non existent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added dcheck when isHighResolution is true. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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.
36
31 // Time that the first byte of the response is received. 37 // Time that the first byte of the response is received.
32 base::TimeDelta response_start; 38 base::TimeDelta response_start;
33 39
34 // Time that the document transitions to the 'loading' state. This is roughly 40 // 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. 41 // the time that the HTML parser begins parsing the main HTML resource.
36 base::TimeDelta dom_loading; 42 base::TimeDelta dom_loading;
37 43
38 // Time immediately before the DOMContentLoaded event is fired. 44 // Time immediately before the DOMContentLoaded event is fired.
39 base::TimeDelta dom_content_loaded_event_start; 45 base::TimeDelta dom_content_loaded_event_start;
40 46
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 struct PageLoadMetadata { 83 struct PageLoadMetadata {
78 PageLoadMetadata(); 84 PageLoadMetadata();
79 bool operator==(const PageLoadMetadata& other) const; 85 bool operator==(const PageLoadMetadata& other) const;
80 // These are packed blink::WebLoadingBehaviorFlag enums. 86 // These are packed blink::WebLoadingBehaviorFlag enums.
81 int behavior_flags = blink::WebLoadingBehaviorNone; 87 int behavior_flags = blink::WebLoadingBehaviorNone;
82 }; 88 };
83 89
84 } // namespace page_load_metrics 90 } // namespace page_load_metrics
85 91
86 #endif // COMPONENTS_PAGE_LOAD_METRICS_COMMON_PAGE_LOAD_TIMING_H_ 92 #endif // COMPONENTS_PAGE_LOAD_METRICS_COMMON_PAGE_LOAD_TIMING_H_
OLDNEW
« no previous file with comments | « components/page_load_metrics/browser/page_load_metrics_util.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698