| 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 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 ObtainAlgorithmToUseFromParams); | 391 ObtainAlgorithmToUseFromParams); |
| 392 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, HalfLifeParam); | 392 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, HalfLifeParam); |
| 393 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, ComputedPercentiles); | 393 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, ComputedPercentiles); |
| 394 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, TestGetMetricsSince); | 394 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, TestGetMetricsSince); |
| 395 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, | 395 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, |
| 396 TestExternalEstimateProviderMergeEstimates); | 396 TestExternalEstimateProviderMergeEstimates); |
| 397 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, | 397 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, |
| 398 UnknownEffectiveConnectionType); | 398 UnknownEffectiveConnectionType); |
| 399 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, | 399 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, |
| 400 TypicalNetworkQualities); | 400 TypicalNetworkQualities); |
| 401 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, |
| 402 OnPrefsReadWithReadingDisabled); |
| 401 | 403 |
| 402 // Value of round trip time observations is in base::TimeDelta. | 404 // Value of round trip time observations is in base::TimeDelta. |
| 403 typedef nqe::internal::Observation<base::TimeDelta> RttObservation; | 405 typedef nqe::internal::Observation<base::TimeDelta> RttObservation; |
| 404 typedef nqe::internal::ObservationBuffer<base::TimeDelta> | 406 typedef nqe::internal::ObservationBuffer<base::TimeDelta> |
| 405 RttObservationBuffer; | 407 RttObservationBuffer; |
| 406 | 408 |
| 407 // Value of throughput observations is in kilobits per second. | 409 // Value of throughput observations is in kilobits per second. |
| 408 typedef nqe::internal::Observation<int32_t> ThroughputObservation; | 410 typedef nqe::internal::Observation<int32_t> ThroughputObservation; |
| 409 typedef nqe::internal::ObservationBuffer<int32_t> ThroughputObservationBuffer; | 411 typedef nqe::internal::ObservationBuffer<int32_t> ThroughputObservationBuffer; |
| 410 | 412 |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 754 | 756 |
| 755 // Stores the qualities of different networks. | 757 // Stores the qualities of different networks. |
| 756 std::unique_ptr<nqe::internal::NetworkQualityStore> network_quality_store_; | 758 std::unique_ptr<nqe::internal::NetworkQualityStore> network_quality_store_; |
| 757 | 759 |
| 758 // True if effective connection type value has been forced via variation | 760 // True if effective connection type value has been forced via variation |
| 759 // parameters. If set to true, GetEffectiveConnectionType() will always return | 761 // parameters. If set to true, GetEffectiveConnectionType() will always return |
| 760 // |forced_effective_connection_type_|. | 762 // |forced_effective_connection_type_|. |
| 761 const bool forced_effective_connection_type_set_; | 763 const bool forced_effective_connection_type_set_; |
| 762 const EffectiveConnectionType forced_effective_connection_type_; | 764 const EffectiveConnectionType forced_effective_connection_type_; |
| 763 | 765 |
| 766 // Set to true if reading of the network quality prefs is enabled. |
| 767 const bool persistent_cache_reading_enabled_; |
| 768 |
| 764 base::ThreadChecker thread_checker_; | 769 base::ThreadChecker thread_checker_; |
| 765 | 770 |
| 766 // Manages the writing of events to the net log. | 771 // Manages the writing of events to the net log. |
| 767 nqe::internal::EventCreator event_creator_; | 772 nqe::internal::EventCreator event_creator_; |
| 768 | 773 |
| 769 base::WeakPtrFactory<NetworkQualityEstimator> weak_ptr_factory_; | 774 base::WeakPtrFactory<NetworkQualityEstimator> weak_ptr_factory_; |
| 770 | 775 |
| 771 DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimator); | 776 DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimator); |
| 772 }; | 777 }; |
| 773 | 778 |
| 774 } // namespace net | 779 } // namespace net |
| 775 | 780 |
| 776 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_ | 781 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_ |
| OLD | NEW |