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

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

Issue 706203003: Update from https://crrev.com/303153 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 7b25b6c6d373268a76a2085e4f20b056d859e41d..dfb50efd4c777739e77d245fe188ea0f3121d2a6 100644
--- a/net/quic/congestion_control/rtt_stats.cc
+++ b/net/quic/congestion_control/rtt_stats.cc
@@ -32,10 +32,6 @@ RttStats::RttStats()
num_min_rtt_samples_remaining_(0),
recent_min_rtt_window_(QuicTime::Delta::Infinite()) {}
-bool RttStats::HasUpdates() const {
- return !smoothed_rtt_.IsZero();
-}
-
void RttStats::SampleNewRecentMinRtt(uint32 num_samples) {
num_min_rtt_samples_remaining_ = num_samples;
new_min_rtt_ = RttSample();
@@ -78,7 +74,7 @@ void RttStats::UpdateRtt(QuicTime::Delta send_delta,
}
latest_rtt_ = rtt_sample;
// First time call.
- if (!HasUpdates()) {
+ if (smoothed_rtt_.IsZero()) {
smoothed_rtt_ = rtt_sample;
mean_deviation_ = QuicTime::Delta::FromMicroseconds(
rtt_sample.ToMicroseconds() / 2);
@@ -131,18 +127,4 @@ void RttStats::UpdateRecentMinRtt(QuicTime::Delta rtt_sample, QuicTime now) {
}
}
-QuicTime::Delta RttStats::SmoothedRtt() const {
- if (!HasUpdates()) {
- return QuicTime::Delta::FromMicroseconds(initial_rtt_us_);
- }
- 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