Chromium Code Reviews| 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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 334 void RemoveNetworkQualitiesCacheObserver( | 334 void RemoveNetworkQualitiesCacheObserver( |
| 335 nqe::internal::NetworkQualityStore::NetworkQualitiesCacheObserver* | 335 nqe::internal::NetworkQualityStore::NetworkQualitiesCacheObserver* |
| 336 observer); | 336 observer); |
| 337 | 337 |
| 338 // Called when the persistent prefs have been read. |read_prefs| contains the | 338 // Called when the persistent prefs have been read. |read_prefs| contains the |
| 339 // parsed prefs as a map between NetworkIDs and CachedNetworkQualities. | 339 // parsed prefs as a map between NetworkIDs and CachedNetworkQualities. |
| 340 void OnPrefsRead( | 340 void OnPrefsRead( |
| 341 const std::map<nqe::internal::NetworkID, | 341 const std::map<nqe::internal::NetworkID, |
| 342 nqe::internal::CachedNetworkQuality> read_prefs); | 342 nqe::internal::CachedNetworkQuality> read_prefs); |
| 343 | 343 |
| 344 // Returns the current transport RTT estimate. If the estimate is unavailable, | |
| 345 // the returned optional value is null. | |
|
RyanSturm
2017/05/25 23:05:50
nit:s/value is null/has no value/
tbansal1
2017/05/26 01:29:28
Done.
| |
| 346 base::Optional<base::TimeDelta> GetTransportRTT() const; | |
| 347 | |
| 344 protected: | 348 protected: |
| 345 // A protected constructor for testing that allows setting the value of | 349 // A protected constructor for testing that allows setting the value of |
| 346 // |add_default_platform_observations_|. | 350 // |add_default_platform_observations_|. |
| 347 NetworkQualityEstimator( | 351 NetworkQualityEstimator( |
| 348 std::unique_ptr<ExternalEstimateProvider> external_estimates_provider, | 352 std::unique_ptr<ExternalEstimateProvider> external_estimates_provider, |
| 349 const std::map<std::string, std::string>& variation_params, | 353 const std::map<std::string, std::string>& variation_params, |
| 350 bool use_local_host_requests_for_tests, | 354 bool use_local_host_requests_for_tests, |
| 351 bool use_smaller_responses_for_tests, | 355 bool use_smaller_responses_for_tests, |
| 352 bool add_default_platform_observations, | 356 bool add_default_platform_observations, |
| 353 const NetLogWithSource& net_log); | 357 const NetLogWithSource& net_log); |
| (...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 789 disallowed_observation_sources_for_transport_; | 793 disallowed_observation_sources_for_transport_; |
| 790 | 794 |
| 791 base::WeakPtrFactory<NetworkQualityEstimator> weak_ptr_factory_; | 795 base::WeakPtrFactory<NetworkQualityEstimator> weak_ptr_factory_; |
| 792 | 796 |
| 793 DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimator); | 797 DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimator); |
| 794 }; | 798 }; |
| 795 | 799 |
| 796 } // namespace net | 800 } // namespace net |
| 797 | 801 |
| 798 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_ | 802 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_ |
| OLD | NEW |