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

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 on top of URLRequest::Read CL Created 4 years, 3 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
« no previous file with comments | « net/nqe/network_quality_estimator.h ('k') | net/nqe/throughput_analyzer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..678b476430d9debae57680c459167c6bbb606d85 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)
return;
if (request.GetResponseCode() != HTTP_OK)
return;
« no previous file with comments | « net/nqe/network_quality_estimator.h ('k') | net/nqe/throughput_analyzer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698