Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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_ |
| OLD | NEW |