| 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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 // If |disable_offline_check| is set to true, then the device offline check is | 289 // If |disable_offline_check| is set to true, then the device offline check is |
| 290 // disabled when computing the effective connection type or when writing the | 290 // disabled when computing the effective connection type or when writing the |
| 291 // prefs. | 291 // prefs. |
| 292 void DisableOfflineCheckForTesting(bool disable_offline_check); | 292 void DisableOfflineCheckForTesting(bool disable_offline_check); |
| 293 | 293 |
| 294 // Reports |effective_connection_type| to all | 294 // Reports |effective_connection_type| to all |
| 295 // EffectiveConnectionTypeObservers. | 295 // EffectiveConnectionTypeObservers. |
| 296 void ReportEffectiveConnectionTypeForTesting( | 296 void ReportEffectiveConnectionTypeForTesting( |
| 297 EffectiveConnectionType effective_connection_type); | 297 EffectiveConnectionType effective_connection_type); |
| 298 | 298 |
| 299 // Reports the RTTs and throughput to all RTTAndThroughputEstimatesObservers. |
| 300 void ReportRTTsAndThroughputForTesting(base::TimeDelta http_rtt, |
| 301 base::TimeDelta transport_rtt, |
| 302 int32_t downstream_throughput_kbps); |
| 303 |
| 299 // Adds and removes |observer| from the list of cache observers. | 304 // Adds and removes |observer| from the list of cache observers. |
| 300 void AddNetworkQualitiesCacheObserver( | 305 void AddNetworkQualitiesCacheObserver( |
| 301 nqe::internal::NetworkQualityStore::NetworkQualitiesCacheObserver* | 306 nqe::internal::NetworkQualityStore::NetworkQualitiesCacheObserver* |
| 302 observer); | 307 observer); |
| 303 void RemoveNetworkQualitiesCacheObserver( | 308 void RemoveNetworkQualitiesCacheObserver( |
| 304 nqe::internal::NetworkQualityStore::NetworkQualitiesCacheObserver* | 309 nqe::internal::NetworkQualityStore::NetworkQualitiesCacheObserver* |
| 305 observer); | 310 observer); |
| 306 | 311 |
| 307 // Called when the persistent prefs have been read. |read_prefs| contains the | 312 // Called when the persistent prefs have been read. |read_prefs| contains the |
| 308 // parsed prefs as a map between NetworkIDs and CachedNetworkQualities. | 313 // parsed prefs as a map between NetworkIDs and CachedNetworkQualities. |
| (...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 802 disallowed_observation_sources_for_transport_; | 807 disallowed_observation_sources_for_transport_; |
| 803 | 808 |
| 804 base::WeakPtrFactory<NetworkQualityEstimator> weak_ptr_factory_; | 809 base::WeakPtrFactory<NetworkQualityEstimator> weak_ptr_factory_; |
| 805 | 810 |
| 806 DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimator); | 811 DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimator); |
| 807 }; | 812 }; |
| 808 | 813 |
| 809 } // namespace net | 814 } // namespace net |
| 810 | 815 |
| 811 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_ | 816 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_ |
| OLD | NEW |