Chromium Code Reviews| Index: net/nqe/network_quality_estimator.cc |
| diff --git a/net/nqe/network_quality_estimator.cc b/net/nqe/network_quality_estimator.cc |
| index 3756629a07e8153c0eb388221e3749b4df35d72e..7f0fb4451b628a40b0149d1f510d37bc67e8f63f 100644 |
| --- a/net/nqe/network_quality_estimator.cc |
| +++ b/net/nqe/network_quality_estimator.cc |
| @@ -740,7 +740,10 @@ void NetworkQualityEstimator::OnConnectionTypeChanged( |
| peak_network_quality_ = nqe::internal::NetworkQuality(); |
| downstream_throughput_kbps_observations_.Clear(); |
| rtt_observations_.Clear(); |
| + |
| + // Update the local state for the new connection. |
|
bengr
2016/07/08 17:00:07
I don't understand this comment.
tbansal1
2016/07/08 18:39:08
Reworded.
First, the local state is cleared ("// C
|
| current_network_id_ = GetCurrentNetworkID(); |
| + RecordNetworkIDAvailability(); |
| // Query the external estimate provider on certain connection types. Once the |
| // updated estimates are available, OnUpdatedEstimateAvailable will be called |
| @@ -835,6 +838,16 @@ void NetworkQualityEstimator::RecordMetricsOnConnectionTypeChanged() const { |
| } |
| } |
| +void NetworkQualityEstimator::RecordNetworkIDAvailability() const { |
| + DCHECK(thread_checker_.CalledOnValidThread()); |
| + if (current_network_id_.type == |
| + NetworkChangeNotifier::ConnectionType::CONNECTION_WIFI || |
| + NetworkChangeNotifier::IsConnectionCellular(current_network_id_.type)) { |
| + UMA_HISTOGRAM_BOOLEAN("NQE.NetworkIdAvailable", |
| + !current_network_id_.id.empty()); |
| + } |
| +} |
| + |
| void NetworkQualityEstimator::RecordMetricsOnMainFrameRequest() const { |
| DCHECK(thread_checker_.CalledOnValidThread()); |