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

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

Issue 2883563002: Refactor UKM interface for mojo-ification (Closed)
Patch Set: Fix uma_session_stats.cc 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // the URL. |app_background_time| should be set to a timestamp if the app was 81 // the URL. |app_background_time| should be set to a timestamp if the app was
81 // backgrounded, otherwise it should be set to a null TimeTicks. 82 // backgrounded, otherwise it should be set to a null TimeTicks.
82 void RecordPageLoadExtraInfoMetrics( 83 void RecordPageLoadExtraInfoMetrics(
83 const page_load_metrics::PageLoadExtraInfo& info, 84 const page_load_metrics::PageLoadExtraInfo& info,
84 base::TimeTicks app_background_time); 85 base::TimeTicks app_background_time);
85 86
86 net::NetworkQualityEstimator::NetworkQualityProvider* const 87 net::NetworkQualityEstimator::NetworkQualityProvider* const
87 network_quality_provider_; 88 network_quality_provider_;
88 89
89 // Unique UKM identifier for the page load we are recording metrics for. 90 // Unique UKM identifier for the page load we are recording metrics for.
90 const int32_t source_id_; 91 const ukm::SourceId source_id_;
91 92
92 // Network quality estimates. 93 // Network quality estimates.
93 net::EffectiveConnectionType effective_connection_type_ = 94 net::EffectiveConnectionType effective_connection_type_ =
94 net::EFFECTIVE_CONNECTION_TYPE_UNKNOWN; 95 net::EFFECTIVE_CONNECTION_TYPE_UNKNOWN;
95 base::Optional<base::TimeDelta> http_rtt_estimate_; 96 base::Optional<base::TimeDelta> http_rtt_estimate_;
96 base::Optional<base::TimeDelta> transport_rtt_estimate_; 97 base::Optional<base::TimeDelta> transport_rtt_estimate_;
97 98
98 // PAGE_TRANSITION_LINK is the default PageTransition value. 99 // PAGE_TRANSITION_LINK is the default PageTransition value.
99 ui::PageTransition page_transition_ = ui::PAGE_TRANSITION_LINK; 100 ui::PageTransition page_transition_ = ui::PAGE_TRANSITION_LINK;
100 101
101 DISALLOW_COPY_AND_ASSIGN(UkmPageLoadMetricsObserver); 102 DISALLOW_COPY_AND_ASSIGN(UkmPageLoadMetricsObserver);
102 }; 103 };
103 104
104 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_UKM_PAGE_LOAD_METRICS_OBSE RVER_H_ 105 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_UKM_PAGE_LOAD_METRICS_OBSE RVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698