Chromium Code Reviews| Index: net/nqe/network_quality_estimator.h |
| diff --git a/net/nqe/network_quality_estimator.h b/net/nqe/network_quality_estimator.h |
| index 973b92579bb653fa452e25dc3a6f6c19cff57785..c7682e40f21442fad15abb9d5466b43643e2d91f 100644 |
| --- a/net/nqe/network_quality_estimator.h |
| +++ b/net/nqe/network_quality_estimator.h |
| @@ -295,6 +295,8 @@ class NET_EXPORT NetworkQualityEstimator |
| virtual double RandDouble() const; |
| private: |
| + FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, |
| + AdaptiveRecomputationEffectiveConnectionType); |
| FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, StoreObservations); |
| FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, TestAddObservation); |
| FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, ObtainOperatingParams); |
| @@ -305,6 +307,8 @@ class NET_EXPORT NetworkQualityEstimator |
| FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, TestGetMetricsSince); |
| FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, |
| TestExternalEstimateProviderMergeEstimates); |
| + FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, |
| + UnknownEffectiveConnectionType); |
| // Value of round trip time observations is in base::TimeDelta. |
| typedef nqe::internal::Observation<base::TimeDelta> RttObservation; |
| @@ -508,13 +512,6 @@ class NET_EXPORT NetworkQualityEstimator |
| // Tick clock used by the network quality estimator. |
| std::unique_ptr<base::TickClock> tick_clock_; |
| - // Minimum duration between two consecutive computations of effective |
| - // connection type. Set to non-zero value as a performance optimization. |
| - const base::TimeDelta effective_connection_type_recomputation_interval_; |
| - |
| - // Time when the effective connection type was last computed. |
| - base::TimeTicks last_effective_connection_type_computation_; |
| - |
| // Intervals after the main frame request arrives at which accuracy of network |
| // quality prediction is recorded. |
| std::vector<base::TimeDelta> accuracy_recording_intervals_; |
| @@ -591,6 +588,18 @@ class NET_EXPORT NetworkQualityEstimator |
| // estimating the throughput. |
| std::unique_ptr<nqe::internal::ThroughputAnalyzer> throughput_analyzer_; |
| + // Minimum duration between two consecutive computations of effective |
|
bengr
2016/08/09 21:29:06
Shouldn't we also recompute if RSSI changes?
tbansal1
2016/08/10 00:13:12
In future CL.
|
| + // connection type. Set to non-zero value as a performance optimization. |
| + const base::TimeDelta effective_connection_type_recomputation_interval_; |
| + |
| + // Time when the effective connection type was last computed. |
| + base::TimeTicks last_effective_connection_type_computation_; |
| + |
| + // Number of RTT and bandwidth samples available when effective connection |
| + // type was last recomputed. |
| + size_t rtt_observations_size_at_last_ect_computation_; |
| + size_t throughput_observations_size_at_last_ect_computation_; |
| + |
| // Current effective connection type. It is updated on connection change |
| // events. It is also updated every time there is network traffic (provided |
| // the last computation was more than |