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

Side by Side Diff: chrome/browser/net/nqe/ui_network_quality_estimator_service.h

Issue 2742293004: Expose getters methods for NQE on UI thread (Closed)
Patch Set: ps Created 3 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/net/nqe/ui_network_quality_estimator_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_NET_NQE_UI_NETWORK_QUALITY_ESTIMATOR_SERVICE_H_ 5 #ifndef CHROME_BROWSER_NET_NQE_UI_NETWORK_QUALITY_ESTIMATOR_SERVICE_H_
6 #define CHROME_BROWSER_NET_NQE_UI_NETWORK_QUALITY_ESTIMATOR_SERVICE_H_ 6 #define CHROME_BROWSER_NET_NQE_UI_NETWORK_QUALITY_ESTIMATOR_SERVICE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 28 matching lines...) Expand all
39 // Must be called on the UI thread. |observer| will be notified on the UI 39 // Must be called on the UI thread. |observer| will be notified on the UI
40 // thread. |observer| would be notified of the current effective connection 40 // thread. |observer| would be notified of the current effective connection
41 // type in the next message pump. 41 // type in the next message pump.
42 void AddEffectiveConnectionTypeObserver( 42 void AddEffectiveConnectionTypeObserver(
43 net::NetworkQualityEstimator::EffectiveConnectionTypeObserver* observer) 43 net::NetworkQualityEstimator::EffectiveConnectionTypeObserver* observer)
44 override; 44 override;
45 // Must be called on the UI thread. 45 // Must be called on the UI thread.
46 void RemoveEffectiveConnectionTypeObserver( 46 void RemoveEffectiveConnectionTypeObserver(
47 net::NetworkQualityEstimator::EffectiveConnectionTypeObserver* observer) 47 net::NetworkQualityEstimator::EffectiveConnectionTypeObserver* observer)
48 override; 48 override;
49 bool GetHttpRTT(base::TimeDelta* http_rtt) const override WARN_UNUSED_RESULT;
RyanSturm 2017/03/15 18:25:30 Return base::optional<TYPE> instead for these?
tbansal1 2017/03/15 22:34:24 Done.
50 bool GetTransportRTT(base::TimeDelta* transport_rtt) const override
51 WARN_UNUSED_RESULT;
52 bool GetDownstreamThroughputKbps(
53 int32_t* downstream_throughput_kbps) const override WARN_UNUSED_RESULT;
RyanSturm 2017/03/15 18:25:30 include <stdint.h>
tbansal1 2017/03/15 22:34:23 Done.
49 54
50 // Must be called on the UI thread. |observer| will be notified on the UI 55 // Must be called on the UI thread. |observer| will be notified on the UI
51 // thread. |observer| would be notified of the changes in the HTTP RTT, 56 // thread. |observer| would be notified of the changes in the HTTP RTT,
52 // transport RTT or throughput. |observer| would be notified of the current 57 // transport RTT or throughput. |observer| would be notified of the current
53 // values in the next message pump. 58 // values in the next message pump.
54 void AddRTTAndThroughputEstimatesObserver( 59 void AddRTTAndThroughputEstimatesObserver(
55 net::NetworkQualityEstimator::RTTAndThroughputEstimatesObserver* observer) 60 net::NetworkQualityEstimator::RTTAndThroughputEstimatesObserver* observer)
56 override; 61 override;
57 62
58 // Removes |observer| from the list of RTT and throughput estimate observers. 63 // Removes |observer| from the list of RTT and throughput estimate observers.
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 // Prefs manager that is owned by this service. Created on the UI thread, but 137 // Prefs manager that is owned by this service. Created on the UI thread, but
133 // used and deleted on the IO thread. 138 // used and deleted on the IO thread.
134 std::unique_ptr<net::NetworkQualitiesPrefsManager> prefs_manager_; 139 std::unique_ptr<net::NetworkQualitiesPrefsManager> prefs_manager_;
135 140
136 base::WeakPtrFactory<UINetworkQualityEstimatorService> weak_factory_; 141 base::WeakPtrFactory<UINetworkQualityEstimatorService> weak_factory_;
137 142
138 DISALLOW_COPY_AND_ASSIGN(UINetworkQualityEstimatorService); 143 DISALLOW_COPY_AND_ASSIGN(UINetworkQualityEstimatorService);
139 }; 144 };
140 145
141 #endif // CHROME_BROWSER_NET_NQE_UI_NETWORK_QUALITY_ESTIMATOR_SERVICE_H_ 146 #endif // CHROME_BROWSER_NET_NQE_UI_NETWORK_QUALITY_ESTIMATOR_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/net/nqe/ui_network_quality_estimator_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698