| Index: net/nqe/network_quality_estimator.h
|
| diff --git a/net/nqe/network_quality_estimator.h b/net/nqe/network_quality_estimator.h
|
| index afeca4eb01e1220879cb01bf87a644ebe06a9775..16620aa51254d2ac9902639ab8b9fdef0fe606de 100644
|
| --- a/net/nqe/network_quality_estimator.h
|
| +++ b/net/nqe/network_quality_estimator.h
|
| @@ -344,6 +344,9 @@ class NET_EXPORT_PRIVATE NetworkQualityEstimator
|
| // Overrides the tick clock used by |this| for testing.
|
| void SetTickClockForTesting(std::unique_ptr<base::TickClock> tick_clock);
|
|
|
| + // Returns a random double in the range [0.0, 1.0). Virtualized for testing.
|
| + virtual double RandDouble() const;
|
| +
|
| private:
|
| FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, StoreObservations);
|
| FRIEND_TEST_ALL_PREFIXES(NetworkQualityEstimatorTest, TestAddObservation);
|
| @@ -534,6 +537,15 @@ class NET_EXPORT_PRIVATE NetworkQualityEstimator
|
| void RecordExternalEstimateProviderMetrics(
|
| NQEExternalEstimateProviderStatus status) const;
|
|
|
| + // Records a correlation metric that can be used for computing the correlation
|
| + // between HTTP-layer RTT, transport-layer RTT, throughput and the time
|
| + // taken to complete |request|.
|
| + void RecordCorrelationMetric(const URLRequest& request) const;
|
| +
|
| + // Returns true if transport RTT should be used for computing the effective
|
| + // connection type.
|
| + bool UseTransportRTT() const;
|
| +
|
| // Determines if the requests to local host can be used in estimating the
|
| // network quality. Set to true only for tests.
|
| bool use_localhost_requests_;
|
| @@ -642,6 +654,13 @@ class NET_EXPORT_PRIVATE NetworkQualityEstimator
|
| int32_t min_signal_strength_since_connection_change_;
|
| int32_t max_signal_strength_since_connection_change_;
|
|
|
| + // It is costlier to add values to a sparse histogram. So, the correlation UMA
|
| + // is recorded with |correlation_uma_logging_probability_| since recording it
|
| + // in a sparse histogram for each request is unnecessary and cost-prohibitive.
|
| + // e.g., if it is 0.0, then the UMA will never be recorded. On the other hand,
|
| + // if it is 1.0, then it will be recorded for all valid HTTP requests.
|
| + const double correlation_uma_logging_probability_;
|
| +
|
| base::ThreadChecker thread_checker_;
|
|
|
| base::WeakPtrFactory<NetworkQualityEstimator> weak_ptr_factory_;
|
|
|