Index: net/nqe/network_quality_estimator.h |
diff --git a/net/nqe/network_quality_estimator.h b/net/nqe/network_quality_estimator.h |
index 696e9b0e85d39c0e2095b90a48dc00a083f8efb2..6305605a5eeff398a201124d0d5aefa6d5cc72bc 100644 |
--- a/net/nqe/network_quality_estimator.h |
+++ b/net/nqe/network_quality_estimator.h |
@@ -160,6 +160,8 @@ class NET_EXPORT NetworkQualityEstimator |
// Returns the current effective connection type. |
virtual EffectiveConnectionType GetEffectiveConnectionType() const = 0; |
+ virtual ~NetworkQualityProvider() {} |
+ |
// Adds |observer| to a list of effective connection type observers. |
virtual void AddEffectiveConnectionTypeObserver( |
EffectiveConnectionTypeObserver* observer) = 0; |
@@ -168,7 +170,16 @@ class NET_EXPORT NetworkQualityEstimator |
virtual void RemoveEffectiveConnectionTypeObserver( |
EffectiveConnectionTypeObserver* observer) = 0; |
- virtual ~NetworkQualityProvider() {} |
+ // Adds |observer| to the list of RTT and throughput estimate observers. |
+ // |observer| would be notified of the current RTT and throughput estimates |
+ // in the next message pump. |
+ void AddRTTAndThroughputEstimatesObserver( |
RyanSturm
2017/03/10 22:10:47
virtual
|
+ RTTAndThroughputEstimatesObserver* observer) override; |
+ |
+ // Removes |observer| from the list of RTT and throughput estimate |
+ // observers. |
+ void RemoveRTTAndThroughputEstimatesObserver( |
RyanSturm
2017/03/10 22:10:47
virtual
|
+ RTTAndThroughputEstimatesObserver* observer) override; |
protected: |
NetworkQualityProvider() {} |
@@ -296,6 +307,11 @@ class NET_EXPORT NetworkQualityEstimator |
void ReportEffectiveConnectionTypeForTesting( |
EffectiveConnectionType effective_connection_type); |
+ // Reports the RTTs and throughput to all RTTAndThroughputEstimatesObservers. |
+ void ReportRTTsAndThroughputForTesting(base::TimeDelta http_rtt, |
+ base::TimeDelta transport_rtt, |
+ int32_t downstream_throughput_kbps); |
+ |
// Adds and removes |observer| from the list of cache observers. |
void AddNetworkQualitiesCacheObserver( |
nqe::internal::NetworkQualityStore::NetworkQualitiesCacheObserver* |