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

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

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: remove todo and fix up a test script 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 #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 10
10 namespace page_load_metrics { 11 namespace page_load_metrics {
11 12
12 // PageLoadTiming contains timing metrics associated with a page load. Many of 13 // PageLoadTiming contains timing metrics associated with a page load. Many of
13 // the metrics here are based on the Navigation Timing spec: 14 // the metrics here are based on the Navigation Timing spec:
14 // http://www.w3.org/TR/navigation-timing/. 15 // http://www.w3.org/TR/navigation-timing/.
15 struct PageLoadTiming { 16 struct PageLoadTiming {
16 public: 17 public:
17 PageLoadTiming(); 18 PageLoadTiming();
18 PageLoadTiming(const PageLoadTiming& other); 19 PageLoadTiming(const PageLoadTiming& other);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 // that was inserted from document.write. This duration must be less than or 67 // that was inserted from document.write. This duration must be less than or
67 // equal to parse_blocked_on_script_load_duration. Note that some uncommon 68 // equal to parse_blocked_on_script_load_duration. Note that some uncommon
68 // cases where scripts are loaded via document.write are not currently covered 69 // cases where scripts are loaded via document.write are not currently covered
69 // by this field. See crbug/600711 for details. 70 // by this field. See crbug/600711 for details.
70 base::TimeDelta parse_blocked_on_script_load_from_document_write_duration; 71 base::TimeDelta parse_blocked_on_script_load_from_document_write_duration;
71 72
72 // If you add additional members, also be sure to update operator==, 73 // If you add additional members, also be sure to update operator==,
73 // page_load_metrics_messages.h, and IsEmpty(). 74 // page_load_metrics_messages.h, and IsEmpty().
74 }; 75 };
75 76
77 struct PageLoadMetadata {
78 PageLoadMetadata();
79 bool operator==(const PageLoadMetadata& other) const;
80 // These are packed blink::WebLoadingBehaviorFlag enums.
81 int behavior_flags = blink::WebLoadingBehaviorNone;
82 };
83
76 } // namespace page_load_metrics 84 } // namespace page_load_metrics
77 85
78 #endif // COMPONENTS_PAGE_LOAD_METRICS_COMMON_PAGE_LOAD_TIMING_H_ 86 #endif // COMPONENTS_PAGE_LOAD_METRICS_COMMON_PAGE_LOAD_TIMING_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698