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

Unified Diff: net/nqe/network_quality_estimator.cc

Issue 2890683002: Override RTT and throughput when ECT is overridden (Closed)
Patch Set: Rebased Created 3 years, 7 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/network_quality_estimator_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 1b6a47d3e46b331c74ad553e88e20b54259ab288..1728675dc93c4cc2f27f1593577248b6af2ec028 100644
--- a/net/nqe/network_quality_estimator.cc
+++ b/net/nqe/network_quality_estimator.cc
@@ -1191,8 +1191,22 @@ NetworkQualityEstimator::GetRecentEffectiveConnectionTypeUsingMetrics(
*transport_rtt = nqe::internal::InvalidRTT();
*downstream_throughput_kbps = nqe::internal::kInvalidThroughput;
- if (params_.forced_effective_connection_type())
+ if (params_.forced_effective_connection_type()) {
+ *http_rtt = params_
+ .TypicalNetworkQuality(
+ params_.forced_effective_connection_type().value())
+ .http_rtt();
+ *transport_rtt = params_
+ .TypicalNetworkQuality(
+ params_.forced_effective_connection_type().value())
+ .transport_rtt();
+ *downstream_throughput_kbps =
+ params_
+ .TypicalNetworkQuality(
+ params_.forced_effective_connection_type().value())
+ .downstream_throughput_kbps();
return params_.forced_effective_connection_type().value();
+ }
// If the device is currently offline, then return
// EFFECTIVE_CONNECTION_TYPE_OFFLINE.
« no previous file with comments | « net/nqe/network_quality_estimator.h ('k') | net/nqe/network_quality_estimator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698