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 da47b1aa66a22905708222a164a6d943ba4ba756..269cf743558b69003a90cbf1e1bb816f44ab7758 100644 |
| --- a/net/nqe/network_quality_estimator.cc |
| +++ b/net/nqe/network_quality_estimator.cc |
| @@ -806,8 +806,8 @@ void NetworkQualityEstimator::RecordAccuracyAfterMainFrame( |
| } |
| } |
| -void NetworkQualityEstimator::NotifyRequestCompleted( |
| - const URLRequest& request) { |
| +void NetworkQualityEstimator::NotifyRequestCompleted(const URLRequest& request, |
| + int net_error) { |
| TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("net"), |
| "NetworkQualityEstimator::NotifyRequestCompleted"); |
| DCHECK(thread_checker_.CalledOnValidThread()); |
| @@ -816,11 +816,11 @@ void NetworkQualityEstimator::NotifyRequestCompleted( |
| return; |
| throughput_analyzer_->NotifyRequestCompleted(request); |
| - RecordCorrelationMetric(request); |
| + RecordCorrelationMetric(request, net_error); |
| } |
| -void NetworkQualityEstimator::RecordCorrelationMetric( |
| - const URLRequest& request) const { |
| +void NetworkQualityEstimator::RecordCorrelationMetric(const URLRequest& request, |
| + int net_error) const { |
| DCHECK(thread_checker_.CalledOnValidThread()); |
| // The histogram is recorded with probability |
| @@ -845,7 +845,7 @@ void NetworkQualityEstimator::RecordCorrelationMetric( |
| } |
| // Record UMA only for successful requests that have completed. |
| - if (!request.status().is_success() || request.status().is_io_pending()) |
| + if (net_error != OK || net_error == ERR_IO_PENDING) |
|
mmenke
2016/08/30 22:13:22
The ERR_IO_PENDING part of this comparison is redu
maksims (do not use this acc)
2016/09/01 12:22:30
Do you mean all the paths here? Do you think they
|
| return; |
| if (request.GetResponseCode() != HTTP_OK) |
| return; |