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

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

Issue 2533783003: Add metrics for style update time before FCP. (Closed)
Patch Set: value_or(base::TimeDelta()) Created 4 years 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 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"
11 11
12 namespace page_load_metrics { 12 namespace page_load_metrics {
13 13
14 struct StyleSheetTiming { 14 struct StyleSheetTiming {
15 StyleSheetTiming(); 15 StyleSheetTiming();
16 StyleSheetTiming(const StyleSheetTiming& other); 16 StyleSheetTiming(const StyleSheetTiming& other);
17 ~StyleSheetTiming(); 17 ~StyleSheetTiming();
18 18
19 bool operator==(const StyleSheetTiming& other) const; 19 bool operator==(const StyleSheetTiming& other) const;
20 bool operator!=(const StyleSheetTiming& other) const { 20 bool operator!=(const StyleSheetTiming& other) const {
21 return !(*this == other); 21 return !(*this == other);
22 } 22 }
23 23
24 bool IsEmpty() const; 24 bool IsEmpty() const;
25 25
26 // Total time spent parsing author style sheets, before the first contentful 26 // Total time spent parsing author style sheets, before the first contentful
27 // paint. 27 // paint.
28 base::Optional<base::TimeDelta> author_style_sheet_parse_duration_before_fcp; 28 base::Optional<base::TimeDelta> author_style_sheet_parse_duration_before_fcp;
29
30 // Time spent in Document::updateStyle before FCP.
31 base::Optional<base::TimeDelta> update_style_duration_before_fcp;
29 }; 32 };
30 33
31 // PageLoadTiming contains timing metrics associated with a page load. Many of 34 // PageLoadTiming contains timing metrics associated with a page load. Many of
32 // the metrics here are based on the Navigation Timing spec: 35 // the metrics here are based on the Navigation Timing spec:
33 // http://www.w3.org/TR/navigation-timing/. 36 // http://www.w3.org/TR/navigation-timing/.
34 struct PageLoadTiming { 37 struct PageLoadTiming {
35 public: 38 public:
36 PageLoadTiming(); 39 PageLoadTiming();
37 PageLoadTiming(const PageLoadTiming& other); 40 PageLoadTiming(const PageLoadTiming& other);
38 ~PageLoadTiming(); 41 ~PageLoadTiming();
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 struct PageLoadMetadata { 127 struct PageLoadMetadata {
125 PageLoadMetadata(); 128 PageLoadMetadata();
126 bool operator==(const PageLoadMetadata& other) const; 129 bool operator==(const PageLoadMetadata& other) const;
127 // These are packed blink::WebLoadingBehaviorFlag enums. 130 // These are packed blink::WebLoadingBehaviorFlag enums.
128 int behavior_flags = blink::WebLoadingBehaviorNone; 131 int behavior_flags = blink::WebLoadingBehaviorNone;
129 }; 132 };
130 133
131 } // namespace page_load_metrics 134 } // namespace page_load_metrics
132 135
133 #endif // CHROME_COMMON_PAGE_LOAD_METRICS_PAGE_LOAD_TIMING_H_ 136 #endif // CHROME_COMMON_PAGE_LOAD_METRICS_PAGE_LOAD_TIMING_H_
OLDNEW
« no previous file with comments | « chrome/common/page_load_metrics/page_load_metrics_messages.h ('k') | chrome/common/page_load_metrics/page_load_timing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698