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

Side by Side Diff: chrome/browser/page_load_metrics/observers/ukm_page_load_metrics_observer.h

Issue 2893943004: Refactor UKM interface for mojo-ification (Closed)
Patch Set: Fixed contextualsearch Created 3 years, 7 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_UKM_PAGE_LOAD_METRICS_OBSERVE R_H_ 5 #ifndef CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_UKM_PAGE_LOAD_METRICS_OBSERVE R_H_
6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_UKM_PAGE_LOAD_METRICS_OBSERVE R_H_ 6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_UKM_PAGE_LOAD_METRICS_OBSERVE R_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/optional.h" 9 #include "base/optional.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
11 #include "chrome/browser/page_load_metrics/page_load_metrics_observer.h" 11 #include "chrome/browser/page_load_metrics/page_load_metrics_observer.h"
12 #include "components/ukm/ukm_service.h"
12 #include "net/nqe/network_quality_estimator.h" 13 #include "net/nqe/network_quality_estimator.h"
13 #include "ui/base/page_transition_types.h" 14 #include "ui/base/page_transition_types.h"
14 15
15 namespace content { 16 namespace content {
16 class WebContents; 17 class WebContents;
17 } 18 }
18 19
19 namespace internal { 20 namespace internal {
20 21
21 // Name constants are exposed here so they can be referenced from tests. 22 // Name constants are exposed here so they can be referenced from tests.
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // the URL. |app_background_time| should be set to a timestamp if the app was 82 // the URL. |app_background_time| should be set to a timestamp if the app was
82 // backgrounded, otherwise it should be set to a null TimeTicks. 83 // backgrounded, otherwise it should be set to a null TimeTicks.
83 void RecordPageLoadExtraInfoMetrics( 84 void RecordPageLoadExtraInfoMetrics(
84 const page_load_metrics::PageLoadExtraInfo& info, 85 const page_load_metrics::PageLoadExtraInfo& info,
85 base::TimeTicks app_background_time); 86 base::TimeTicks app_background_time);
86 87
87 net::NetworkQualityEstimator::NetworkQualityProvider* const 88 net::NetworkQualityEstimator::NetworkQualityProvider* const
88 network_quality_provider_; 89 network_quality_provider_;
89 90
90 // Unique UKM identifier for the page load we are recording metrics for. 91 // Unique UKM identifier for the page load we are recording metrics for.
91 const int32_t source_id_; 92 const ukm::SourceId source_id_;
92 93
93 // Network quality estimates. 94 // Network quality estimates.
94 net::EffectiveConnectionType effective_connection_type_ = 95 net::EffectiveConnectionType effective_connection_type_ =
95 net::EFFECTIVE_CONNECTION_TYPE_UNKNOWN; 96 net::EFFECTIVE_CONNECTION_TYPE_UNKNOWN;
96 base::Optional<base::TimeDelta> http_rtt_estimate_; 97 base::Optional<base::TimeDelta> http_rtt_estimate_;
97 base::Optional<base::TimeDelta> transport_rtt_estimate_; 98 base::Optional<base::TimeDelta> transport_rtt_estimate_;
98 99
99 // PAGE_TRANSITION_LINK is the default PageTransition value. 100 // PAGE_TRANSITION_LINK is the default PageTransition value.
100 ui::PageTransition page_transition_ = ui::PAGE_TRANSITION_LINK; 101 ui::PageTransition page_transition_ = ui::PAGE_TRANSITION_LINK;
101 102
102 DISALLOW_COPY_AND_ASSIGN(UkmPageLoadMetricsObserver); 103 DISALLOW_COPY_AND_ASSIGN(UkmPageLoadMetricsObserver);
103 }; 104 };
104 105
105 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_UKM_PAGE_LOAD_METRICS_OBSE RVER_H_ 106 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_UKM_PAGE_LOAD_METRICS_OBSE RVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698