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

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

Issue 1857443002: Plumb experiment flags through page_load_metrics and add a new observer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@page_load_experiments
Patch Set: clean up unit tests Created 4 years, 8 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 #include "components/page_load_metrics/common/page_load_timing.h" 5 #include "components/page_load_metrics/common/page_load_timing.h"
6 #include "third_party/WebKit/public/platform/WebExperimentData.h"
6 7
7 namespace page_load_metrics { 8 namespace page_load_metrics {
8 9
9 PageLoadTiming::PageLoadTiming() {} 10 PageLoadTiming::PageLoadTiming() {}
10 11
11 PageLoadTiming::PageLoadTiming(const PageLoadTiming& other) = default; 12 PageLoadTiming::PageLoadTiming(const PageLoadTiming& other) = default;
12 13
13 PageLoadTiming::~PageLoadTiming() {} 14 PageLoadTiming::~PageLoadTiming() {}
14 15
15 bool PageLoadTiming::operator==(const PageLoadTiming& other) const { 16 bool PageLoadTiming::operator==(const PageLoadTiming& other) const {
(...skipping 10 matching lines...) Expand all
26 } 27 }
27 28
28 bool PageLoadTiming::IsEmpty() const { 29 bool PageLoadTiming::IsEmpty() const {
29 return navigation_start.is_null() && response_start.is_zero() && 30 return navigation_start.is_null() && response_start.is_zero() &&
30 dom_loading.is_zero() && dom_content_loaded_event_start.is_zero() && 31 dom_loading.is_zero() && dom_content_loaded_event_start.is_zero() &&
31 load_event_start.is_zero() && first_layout.is_zero() && 32 load_event_start.is_zero() && first_layout.is_zero() &&
32 first_paint.is_zero() && first_text_paint.is_zero() && 33 first_paint.is_zero() && first_text_paint.is_zero() &&
33 first_image_paint.is_zero(); 34 first_image_paint.is_zero();
34 } 35 }
35 36
37 PageLoadMetadata::PageLoadMetadata()
38 : experiment_flags(blink::WebExperimentData::NoExperiment) {}
39
40 bool PageLoadMetadata::operator==(const PageLoadMetadata& other) const {
41 return experiment_flags == other.experiment_flags;
42 }
43
36 } // namespace page_load_metrics 44 } // namespace page_load_metrics
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698