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

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

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 #include "chrome/common/page_load_metrics/page_load_timing.h" 5 #include "chrome/common/page_load_metrics/page_load_timing.h"
6 6
7 namespace page_load_metrics { 7 namespace page_load_metrics {
8 8
9 StyleSheetTiming::StyleSheetTiming() {} 9 StyleSheetTiming::StyleSheetTiming() {}
10 10
11 StyleSheetTiming::StyleSheetTiming(const StyleSheetTiming& other) = default; 11 StyleSheetTiming::StyleSheetTiming(const StyleSheetTiming& other) = default;
12 12
13 StyleSheetTiming::~StyleSheetTiming() {} 13 StyleSheetTiming::~StyleSheetTiming() {}
14 14
15 bool StyleSheetTiming::operator==(const StyleSheetTiming& other) const { 15 bool StyleSheetTiming::operator==(const StyleSheetTiming& other) const {
16 return author_style_sheet_parse_duration_before_fcp == 16 return author_style_sheet_parse_duration_before_fcp ==
17 other.author_style_sheet_parse_duration_before_fcp; 17 other.author_style_sheet_parse_duration_before_fcp &&
18 update_style_duration_before_fcp ==
19 other.update_style_duration_before_fcp;
18 } 20 }
19 21
20 bool StyleSheetTiming::IsEmpty() const { 22 bool StyleSheetTiming::IsEmpty() const {
21 return !author_style_sheet_parse_duration_before_fcp; 23 return !author_style_sheet_parse_duration_before_fcp &&
24 !update_style_duration_before_fcp;
22 } 25 }
23 26
24 PageLoadTiming::PageLoadTiming() {} 27 PageLoadTiming::PageLoadTiming() {}
25 28
26 PageLoadTiming::PageLoadTiming(const PageLoadTiming& other) = default; 29 PageLoadTiming::PageLoadTiming(const PageLoadTiming& other) = default;
27 30
28 PageLoadTiming::~PageLoadTiming() {} 31 PageLoadTiming::~PageLoadTiming() {}
29 32
30 bool PageLoadTiming::operator==(const PageLoadTiming& other) const { 33 bool PageLoadTiming::operator==(const PageLoadTiming& other) const {
31 return navigation_start == other.navigation_start && 34 return navigation_start == other.navigation_start &&
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 style_sheet_timing.IsEmpty(); 68 style_sheet_timing.IsEmpty();
66 } 69 }
67 70
68 PageLoadMetadata::PageLoadMetadata() {} 71 PageLoadMetadata::PageLoadMetadata() {}
69 72
70 bool PageLoadMetadata::operator==(const PageLoadMetadata& other) const { 73 bool PageLoadMetadata::operator==(const PageLoadMetadata& other) const {
71 return behavior_flags == other.behavior_flags; 74 return behavior_flags == other.behavior_flags;
72 } 75 }
73 76
74 } // namespace page_load_metrics 77 } // namespace page_load_metrics
OLDNEW
« no previous file with comments | « chrome/common/page_load_metrics/page_load_timing.h ('k') | chrome/renderer/page_load_metrics/metrics_render_frame_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698