OLD | NEW |
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 NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_ | 5 #ifndef NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_ |
6 #define NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_ | 6 #define NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 EffectiveConnectionType effective_connection_type); | 274 EffectiveConnectionType effective_connection_type); |
275 | 275 |
276 // Adds and removes |observer| from the list of cache observers. | 276 // Adds and removes |observer| from the list of cache observers. |
277 void AddNetworkQualitiesCacheObserver( | 277 void AddNetworkQualitiesCacheObserver( |
278 nqe::internal::NetworkQualityStore::NetworkQualitiesCacheObserver* | 278 nqe::internal::NetworkQualityStore::NetworkQualitiesCacheObserver* |
279 observer); | 279 observer); |
280 void RemoveNetworkQualitiesCacheObserver( | 280 void RemoveNetworkQualitiesCacheObserver( |
281 nqe::internal::NetworkQualityStore::NetworkQualitiesCacheObserver* | 281 nqe::internal::NetworkQualityStore::NetworkQualitiesCacheObserver* |
282 observer); | 282 observer); |
283 | 283 |
| 284 // Called when the persistent prefs have been read. |read_prefs| contains the |
| 285 // parsed prefs as a map between NetworkIDs and CachedNetworkQualities. |
| 286 void OnPrefsRead( |
| 287 const std::map<nqe::internal::NetworkID, |
| 288 nqe::internal::CachedNetworkQuality> read_prefs); |
| 289 |
284 protected: | 290 protected: |
285 // NetworkChangeNotifier::ConnectionTypeObserver implementation: | 291 // NetworkChangeNotifier::ConnectionTypeObserver implementation: |
286 void OnConnectionTypeChanged( | 292 void OnConnectionTypeChanged( |
287 NetworkChangeNotifier::ConnectionType type) override; | 293 NetworkChangeNotifier::ConnectionType type) override; |
288 | 294 |
289 // ExternalEstimateProvider::UpdatedEstimateObserver implementation. | 295 // ExternalEstimateProvider::UpdatedEstimateObserver implementation. |
290 void OnUpdatedEstimateAvailable(const base::TimeDelta& rtt, | 296 void OnUpdatedEstimateAvailable(const base::TimeDelta& rtt, |
291 int32_t downstream_throughput_kbps, | 297 int32_t downstream_throughput_kbps, |
292 int32_t upstream_throughput_kbps) override; | 298 int32_t upstream_throughput_kbps) override; |
293 | 299 |
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
721 base::ThreadChecker thread_checker_; | 727 base::ThreadChecker thread_checker_; |
722 | 728 |
723 base::WeakPtrFactory<NetworkQualityEstimator> weak_ptr_factory_; | 729 base::WeakPtrFactory<NetworkQualityEstimator> weak_ptr_factory_; |
724 | 730 |
725 DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimator); | 731 DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimator); |
726 }; | 732 }; |
727 | 733 |
728 } // namespace net | 734 } // namespace net |
729 | 735 |
730 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_ | 736 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_ |
OLD | NEW |