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

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

Issue 2139143002: Standardize which page loads are tracked (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add tests Created 4 years, 5 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
« no previous file with comments | « components/page_load_metrics/browser/page_load_metrics_observer.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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"
11 11
12 namespace page_load_metrics { 12 namespace page_load_metrics {
13 13
14 // PageLoadTiming contains timing metrics associated with a page load. Many of 14 // PageLoadTiming contains timing metrics associated with a page load. Many of
15 // the metrics here are based on the Navigation Timing spec: 15 // the metrics here are based on the Navigation Timing spec:
16 // http://www.w3.org/TR/navigation-timing/. 16 // http://www.w3.org/TR/navigation-timing/.
17 struct PageLoadTiming { 17 struct PageLoadTiming {
18 public: 18 public:
19 PageLoadTiming(); 19 PageLoadTiming();
20 PageLoadTiming(const PageLoadTiming& other); 20 PageLoadTiming(const PageLoadTiming& other);
21 ~PageLoadTiming(); 21 ~PageLoadTiming();
22 22
23 bool operator==(const PageLoadTiming& other) const; 23 bool operator==(const PageLoadTiming& other) const;
24 bool operator!=(const PageLoadTiming& other) const {
25 return !(*this == other);
26 }
24 27
25 bool IsEmpty() const; 28 bool IsEmpty() const;
26 29
27 // Time that the navigation for the associated page was initiated. 30 // Time that the navigation for the associated page was initiated.
28 base::Time navigation_start; 31 base::Time navigation_start;
29 32
30 // All TimeDeltas are relative to navigation_start 33 // All TimeDeltas are relative to navigation_start
31 34
32 // Time that the first byte of the response is received. 35 // Time that the first byte of the response is received.
33 base::Optional<base::TimeDelta> response_start; 36 base::Optional<base::TimeDelta> response_start;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_
OLDNEW
« no previous file with comments | « components/page_load_metrics/browser/page_load_metrics_observer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698