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

Unified Diff: net/nqe/network_quality_estimator.cc

Issue 2717153002: NQE: Plumb RTT and throughput estimates to the UI thread (Closed)
Patch Set: ps Created 3 years, 9 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 0d5fbe384a68acfc4bdc54a38f8517cff71fa24b..a989356969d81fe239717ab7837eb81d84e11803 100644
--- a/net/nqe/network_quality_estimator.cc
+++ b/net/nqe/network_quality_estimator.cc
@@ -808,6 +808,17 @@ void NetworkQualityEstimator::ReportEffectiveConnectionTypeForTesting(
effective_connection_type));
}
+void NetworkQualityEstimator::ReportRTTsAndThroughputForTesting(
+ base::TimeDelta http_rtt,
+ base::TimeDelta transport_rtt,
+ int32_t downstream_throughput_kbps) {
+ DCHECK(thread_checker_.CalledOnValidThread());
+
+ for (auto& observer : rtt_and_throughput_estimates_observer_list_)
+ observer.OnRTTOrThroughputEstimatesComputed(http_rtt, transport_rtt,
+ downstream_throughput_kbps);
+}
+
bool NetworkQualityEstimator::RequestProvidesRTTObservation(
const URLRequest& request) const {
DCHECK(thread_checker_.CalledOnValidThread());

Powered by Google App Engine
This is Rietveld 408576698