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

Unified Diff: net/nqe/network_quality_estimator.cc

Issue 2332643002: Change net/nqe and some url_request tests to use new URLRequest API (Closed)
Patch Set: add ftp job unittests and http job files 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 359b437ebfcf8521d6b2b9f947834418337650eb..58fd4fddbfa22677f2e48f1ab479fdfa11e9e83e 100644
--- a/net/nqe/network_quality_estimator.cc
+++ b/net/nqe/network_quality_estimator.cc
@@ -807,8 +807,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());
@@ -817,11 +817,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
@@ -846,7 +846,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