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

Unified Diff: net/nqe/network_quality_estimator.cc

Issue 2433923005: Revert of Expose RTT and throughput estimates from Cronet (Closed)
Patch Set: 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.cc ('k') | no next file » | 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 136591d8ac0a0f111c8ac221d955efb56f3d1c7f..41947a4f325297846fc42ca5fecd3c3460af5f03 100644
--- a/net/nqe/network_quality_estimator.cc
+++ b/net/nqe/network_quality_estimator.cc
@@ -409,14 +409,6 @@
weak_ptr_factory_(this) {
static_assert(kDefaultHalfLifeSeconds > 0,
"Default half life duration must be > 0");
- static_assert(kMinimumRTTVariationParameterMsec > 0 &&
- kMinimumRTTVariationParameterMsec >
- nqe::internal::INVALID_RTT_THROUGHPUT,
- "kMinimumRTTVariationParameterMsec is set incorrectly");
- static_assert(kMinimumThroughputVariationParameterKbps > 0 &&
- kMinimumThroughputVariationParameterKbps >
- nqe::internal::kInvalidThroughput,
- "kMinimumThroughputVariationParameterKbps is set incorrectly");
// None of the algorithms can have an empty name.
DCHECK(algorithm_name_to_enum_.end() ==
algorithm_name_to_enum_.find(std::string()));
@@ -722,8 +714,7 @@
base::TimeDelta observed_http_rtt =
load_timing_info.receive_headers_end - load_timing_info.send_start;
DCHECK_GE(observed_http_rtt, base::TimeDelta());
- if (observed_http_rtt < peak_network_quality_.http_rtt() ||
- peak_network_quality_.http_rtt() == nqe::internal::InvalidRTT()) {
+ if (observed_http_rtt < peak_network_quality_.http_rtt()) {
peak_network_quality_ = nqe::internal::NetworkQuality(
observed_http_rtt, peak_network_quality_.transport_rtt(),
peak_network_quality_.downstream_throughput_kbps());
@@ -1712,9 +1703,7 @@
DCHECK_NE(nqe::internal::kInvalidThroughput, downstream_kbps);
- if (downstream_kbps > peak_network_quality_.downstream_throughput_kbps() ||
- peak_network_quality_.downstream_throughput_kbps() ==
- nqe::internal::kInvalidThroughput) {
+ if (downstream_kbps > peak_network_quality_.downstream_throughput_kbps()) {
peak_network_quality_ = nqe::internal::NetworkQuality(
peak_network_quality_.http_rtt(), peak_network_quality_.transport_rtt(),
downstream_kbps);
« no previous file with comments | « net/nqe/network_quality.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698