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 13 matching lines...) Expand all Loading... |
24 #include "net/base/network_change_notifier.h" | 24 #include "net/base/network_change_notifier.h" |
25 #include "net/nqe/cached_network_quality.h" | 25 #include "net/nqe/cached_network_quality.h" |
26 #include "net/nqe/external_estimate_provider.h" | 26 #include "net/nqe/external_estimate_provider.h" |
27 #include "net/nqe/network_quality.h" | 27 #include "net/nqe/network_quality.h" |
28 #include "net/nqe/network_quality_observation.h" | 28 #include "net/nqe/network_quality_observation.h" |
29 #include "net/nqe/network_quality_observation_source.h" | 29 #include "net/nqe/network_quality_observation_source.h" |
30 #include "net/nqe/observation_buffer.h" | 30 #include "net/nqe/observation_buffer.h" |
31 #include "net/socket/socket_performance_watcher_factory.h" | 31 #include "net/socket/socket_performance_watcher_factory.h" |
32 | 32 |
33 namespace base { | 33 namespace base { |
34 class SingleThreadTaskRunner; | |
35 class TickClock; | 34 class TickClock; |
36 } // namespace base | 35 } // namespace base |
37 | 36 |
38 namespace net { | 37 namespace net { |
39 | 38 |
40 namespace nqe { | 39 namespace nqe { |
41 namespace internal { | 40 namespace internal { |
42 class ThroughputAnalyzer; | 41 class ThroughputAnalyzer; |
43 } | 42 } |
44 } | 43 } |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, ObtainOperatingParams); | 318 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, ObtainOperatingParams); |
320 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, HalfLifeParam); | 319 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, HalfLifeParam); |
321 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, ComputedPercentiles); | 320 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, ComputedPercentiles); |
322 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, TestCaching); | 321 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, TestCaching); |
323 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, | 322 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, |
324 TestLRUCacheMaximumSize); | 323 TestLRUCacheMaximumSize); |
325 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, TestGetMetricsSince); | 324 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, TestGetMetricsSince); |
326 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, | 325 FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, |
327 TestExternalEstimateProviderMergeEstimates); | 326 TestExternalEstimateProviderMergeEstimates); |
328 | 327 |
329 class SocketWatcher; | |
330 class SocketWatcherFactory; | |
331 | |
332 // Value of round trip time observations is in base::TimeDelta. | 328 // Value of round trip time observations is in base::TimeDelta. |
333 typedef nqe::internal::Observation<base::TimeDelta> RttObservation; | 329 typedef nqe::internal::Observation<base::TimeDelta> RttObservation; |
334 typedef nqe::internal::ObservationBuffer<base::TimeDelta> | 330 typedef nqe::internal::ObservationBuffer<base::TimeDelta> |
335 RttObservationBuffer; | 331 RttObservationBuffer; |
336 | 332 |
337 // Value of throughput observations is in kilobits per second. | 333 // Value of throughput observations is in kilobits per second. |
338 typedef nqe::internal::Observation<int32_t> ThroughputObservation; | 334 typedef nqe::internal::Observation<int32_t> ThroughputObservation; |
339 typedef nqe::internal::ObservationBuffer<int32_t> ThroughputObservationBuffer; | 335 typedef nqe::internal::ObservationBuffer<int32_t> ThroughputObservationBuffer; |
340 | 336 |
341 // This does not use a unordered_map or hash_map for code simplicity (key just | 337 // This does not use a unordered_map or hash_map for code simplicity (key just |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
548 base::ThreadChecker thread_checker_; | 544 base::ThreadChecker thread_checker_; |
549 | 545 |
550 base::WeakPtrFactory<NetworkQualityEstimator> weak_ptr_factory_; | 546 base::WeakPtrFactory<NetworkQualityEstimator> weak_ptr_factory_; |
551 | 547 |
552 DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimator); | 548 DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimator); |
553 }; | 549 }; |
554 | 550 |
555 } // namespace net | 551 } // namespace net |
556 | 552 |
557 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_ | 553 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_ |
OLD | NEW |