Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(564)

Unified Diff: net/nqe/network_quality_estimator.cc

Issue 2265873002: Adjust callers and networking delegates in net/ to modified APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@URLRequestRead
Patch Set: rebased Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;

Powered by Google App Engine
This is Rietveld 408576698