| Index: net/nqe/network_quality_estimator.cc
|
| diff --git a/net/nqe/network_quality_estimator.cc b/net/nqe/network_quality_estimator.cc
|
| index 96c0f3c92ccac8217bfc93906fa22031ccd95a22..dbf4986aaff0e8d7016e0240eb0496e393e549bd 100644
|
| --- a/net/nqe/network_quality_estimator.cc
|
| +++ b/net/nqe/network_quality_estimator.cc
|
| @@ -1647,10 +1647,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;
|
| }
|
|
|
| @@ -1665,6 +1669,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(
|
|
|