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

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

Issue 131743009: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use size_t instead of int to fix win_x64 compile error Created 6 years, 11 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/fix_rate_sender.h ('k') | net/quic/congestion_control/fix_rate_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/congestion_control/fix_rate_sender.cc
diff --git a/net/quic/congestion_control/fix_rate_sender.cc b/net/quic/congestion_control/fix_rate_sender.cc
index e9c219bd5dbab0ced8d93a923665e9fa544ed763..9e198e99301b0d7c01274f860aca50aaeb7e41f9 100644
--- a/net/quic/congestion_control/fix_rate_sender.cc
+++ b/net/quic/congestion_control/fix_rate_sender.cc
@@ -58,16 +58,8 @@ void FixRateSender::OnIncomingQuicCongestionFeedbackFrame(
void FixRateSender::OnPacketAcked(
QuicPacketSequenceNumber /*acked_sequence_number*/,
- QuicByteCount bytes_acked,
- QuicTime::Delta rtt) {
- // RTT can't be negative.
- DCHECK_LE(0, rtt.ToMicroseconds());
-
+ QuicByteCount bytes_acked) {
data_in_flight_ -= bytes_acked;
- if (rtt.IsInfinite()) {
- return;
- }
- latest_rtt_ = rtt;
}
void FixRateSender::OnPacketLost(QuicPacketSequenceNumber /*sequence_number*/,
@@ -127,6 +119,15 @@ QuicBandwidth FixRateSender::BandwidthEstimate() const {
return bitrate_;
}
+void FixRateSender::UpdateRtt(QuicTime::Delta rtt_sample) {
+ // RTT can't be negative.
+ DCHECK_LE(0, rtt_sample.ToMicroseconds());
+ if (rtt_sample.IsInfinite()) {
+ return;
+ }
+ latest_rtt_ = rtt_sample;
+}
+
QuicTime::Delta FixRateSender::SmoothedRtt() const {
// TODO(satyamshekhar): Calculate and return smoothed rtt.
return latest_rtt_;
« no previous file with comments | « net/quic/congestion_control/fix_rate_sender.h ('k') | net/quic/congestion_control/fix_rate_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698