| Index: net/nqe/network_quality_estimator.cc
|
| diff --git a/net/nqe/network_quality_estimator.cc b/net/nqe/network_quality_estimator.cc
|
| index c2e9f5d1d42592f23a4e23e322aa2046b02a1560..d38cf0b4f690c7715e97f87253e29231e2423045 100644
|
| --- a/net/nqe/network_quality_estimator.cc
|
| +++ b/net/nqe/network_quality_estimator.cc
|
| @@ -1643,10 +1643,14 @@ void NetworkQualityEstimator::MaybeRecomputeEffectiveConnectionType() {
|
| // last computed or a connection change event was observed since the last
|
| // computation. Strict inequalities are used to ensure that effective
|
| // connection type is recomputed on connection change events even if the clock
|
| - // has not updated.
|
| + // has not updated. Recompute the effective connection type if the effective
|
| + // connection type was previously unavailable. This is because the RTT
|
| + // observations are voluminous, so it may now be possible to compute the
|
| + // effective connection type.
|
| if (now - last_effective_connection_type_computation_ <
|
| effective_connection_type_recomputation_interval_ &&
|
| - last_connection_change_ < last_effective_connection_type_computation_) {
|
| + last_connection_change_ < last_effective_connection_type_computation_ &&
|
| + effective_connection_type_ != EFFECTIVE_CONNECTION_TYPE_UNKNOWN) {
|
| return;
|
| }
|
|
|
| @@ -1661,6 +1665,7 @@ void NetworkQualityEstimator::MaybeRecomputeEffectiveConnectionType() {
|
| void NetworkQualityEstimator::
|
| NotifyObserversOfEffectiveConnectionTypeChanged() {
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
| + DCHECK_NE(EFFECTIVE_CONNECTION_TYPE_LAST, effective_connection_type_);
|
|
|
| // TODO(tbansal): Add hysteresis in the notification.
|
| FOR_EACH_OBSERVER(
|
|
|