Index: net/nqe/network_quality_estimator.cc |
diff --git a/net/nqe/network_quality_estimator.cc b/net/nqe/network_quality_estimator.cc |
index 8759b0fb4324cef241909f79fe3adf3fb2c12ec5..6aefd09f2513a6757af5a54e9e3f17b91cd171fe 100644 |
--- a/net/nqe/network_quality_estimator.cc |
+++ b/net/nqe/network_quality_estimator.cc |
@@ -1767,6 +1767,14 @@ void NetworkQualityEstimator::OnPrefsRead( |
} |
} |
+base::Optional<base::TimeDelta> NetworkQualityEstimator::GetHttpRTT() const { |
+ DCHECK(thread_checker_.CalledOnValidThread()); |
+ |
+ if (network_quality_.http_rtt() == nqe::internal::InvalidRTT()) |
+ return base::Optional<base::TimeDelta>(); |
+ return network_quality_.http_rtt(); |
+} |
+ |
base::Optional<base::TimeDelta> NetworkQualityEstimator::GetTransportRTT() |
const { |
DCHECK(thread_checker_.CalledOnValidThread()); |
@@ -1776,6 +1784,17 @@ base::Optional<base::TimeDelta> NetworkQualityEstimator::GetTransportRTT() |
return network_quality_.transport_rtt(); |
} |
+base::Optional<int32_t> NetworkQualityEstimator::GetDownstreamThroughputKbps() |
+ const { |
+ DCHECK(thread_checker_.CalledOnValidThread()); |
+ |
+ if (network_quality_.downstream_throughput_kbps() == |
+ nqe::internal::kInvalidThroughput) { |
+ return base::Optional<int32_t>(); |
+ } |
+ return network_quality_.downstream_throughput_kbps(); |
+} |
+ |
void NetworkQualityEstimator::MaybeUpdateNetworkQualityFromCache( |
const nqe::internal::NetworkID& network_id, |
const nqe::internal::CachedNetworkQuality& cached_network_quality) { |