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

Unified Diff: net/nqe/network_quality_estimator_test_util.cc

Issue 2406763003: Add Network Quality observer to NQE (Closed)
Patch Set: Fix presubmit errors (FOR_EACH_OBSERVER is deprecated) Created 4 years, 2 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_test_util.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_test_util.cc
diff --git a/net/nqe/network_quality_estimator_test_util.cc b/net/nqe/network_quality_estimator_test_util.cc
index 80e7889ffb6460fe0207689dd82a345a8b309b02..db9e283590c34a3702f9a18854e642a1ccff1be3 100644
--- a/net/nqe/network_quality_estimator_test_util.cc
+++ b/net/nqe/network_quality_estimator_test_util.cc
@@ -109,6 +109,23 @@ TestNetworkQualityEstimator::GetRecentEffectiveConnectionType(
return NetworkQualityEstimator::GetRecentEffectiveConnectionType(start_time);
}
+EffectiveConnectionType
+TestNetworkQualityEstimator::GetRecentEffectiveConnectionTypeAndNetworkQuality(
+ const base::TimeTicks& start_time,
+ base::TimeDelta* http_rtt,
+ base::TimeDelta* transport_rtt,
+ int32_t* downstream_throughput_kbps) const {
+ if (recent_effective_connection_type_set_) {
+ *http_rtt = recent_http_rtt_;
+ *transport_rtt = recent_transport_rtt_;
+ *downstream_throughput_kbps = recent_downlink_throughput_kbps_;
+ return recent_effective_connection_type_;
+ }
+ return NetworkQualityEstimator::
+ GetRecentEffectiveConnectionTypeAndNetworkQuality(
+ start_time, http_rtt, transport_rtt, downstream_throughput_kbps);
+}
+
bool TestNetworkQualityEstimator::GetHttpRTT(base::TimeDelta* rtt) const {
if (http_rtt_set_) {
*rtt = http_rtt_;
« no previous file with comments | « net/nqe/network_quality_estimator_test_util.h ('k') | net/nqe/network_quality_estimator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698