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

Unified Diff: net/quic/congestion_control/rtt_stats.cc

Issue 667763003: Landing Recent QUIC Changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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/quic/congestion_control/rtt_stats.h ('k') | net/quic/congestion_control/rtt_stats_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/congestion_control/rtt_stats.cc
diff --git a/net/quic/congestion_control/rtt_stats.cc b/net/quic/congestion_control/rtt_stats.cc
index b03686d747e6621102e0dd7e11d125fdf261e528..2eb0b8d5510cd71f26745429fe02ff832c0595a1 100644
--- a/net/quic/congestion_control/rtt_stats.cc
+++ b/net/quic/congestion_control/rtt_stats.cc
@@ -68,7 +68,7 @@ void RttStats::UpdateRtt(QuicTime::Delta send_delta,
<< (rtt_sample.IsZero() ? "Zero" : "Infinite");
return;
}
- // RTT can't be negative.
+ // RTT can't be non-positive.
DCHECK_LT(0, rtt_sample.ToMicroseconds());
latest_rtt_ = rtt_sample;
@@ -138,4 +138,11 @@ QuicTime::Delta RttStats::SmoothedRtt() const {
return smoothed_rtt_;
}
+QuicTime::Delta RttStats::MinRtt() const {
+ if (!HasUpdates()) {
+ return QuicTime::Delta::FromMicroseconds(initial_rtt_us_);
+ }
+ return min_rtt_;
+}
+
} // namespace net
« no previous file with comments | « net/quic/congestion_control/rtt_stats.h ('k') | net/quic/congestion_control/rtt_stats_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698