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

Side by Side Diff: net/quic/congestion_control/fix_rate_sender.cc

Issue 355573007: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added NET_EXPORT_PRIVATE for ContainsQuicTag Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/congestion_control/fix_rate_sender.h" 5 #include "net/quic/congestion_control/fix_rate_sender.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 QuicTime sent_time, 58 QuicTime sent_time,
59 QuicByteCount /*bytes_in_flight*/, 59 QuicByteCount /*bytes_in_flight*/,
60 QuicPacketSequenceNumber /*sequence_number*/, 60 QuicPacketSequenceNumber /*sequence_number*/,
61 QuicByteCount bytes, 61 QuicByteCount bytes,
62 HasRetransmittableData /*has_retransmittable_data*/) { 62 HasRetransmittableData /*has_retransmittable_data*/) {
63 fix_rate_leaky_bucket_.Add(sent_time, bytes); 63 fix_rate_leaky_bucket_.Add(sent_time, bytes);
64 64
65 return true; 65 return true;
66 } 66 }
67 67
68 void FixRateSender::OnRetransmissionTimeout(bool packets_retransmitted) { } 68 void FixRateSender::OnRetransmissionTimeout(bool packets_retransmitted) {}
69
70 void FixRateSender::RevertRetransmissionTimeout() {}
69 71
70 QuicTime::Delta FixRateSender::TimeUntilSend( 72 QuicTime::Delta FixRateSender::TimeUntilSend(
71 QuicTime now, 73 QuicTime now,
72 QuicByteCount /*bytes_in_flight*/, 74 QuicByteCount /*bytes_in_flight*/,
73 HasRetransmittableData /*has_retransmittable_data*/) const { 75 HasRetransmittableData /*has_retransmittable_data*/) const {
74 return fix_rate_leaky_bucket_.TimeRemaining(now); 76 return fix_rate_leaky_bucket_.TimeRemaining(now);
75 } 77 }
76 78
77 QuicByteCount FixRateSender::CongestionWindow() const { 79 QuicByteCount FixRateSender::CongestionWindow() const {
78 QuicByteCount window_size_bytes = bitrate_.ToBytesPerPeriod( 80 QuicByteCount window_size_bytes = bitrate_.ToBytesPerPeriod(
(...skipping 11 matching lines...) Expand all
90 // TODO(pwestin): Calculate and return retransmission delay. 92 // TODO(pwestin): Calculate and return retransmission delay.
91 // Use 2 * the latest RTT for now. 93 // Use 2 * the latest RTT for now.
92 return latest_rtt_.Add(latest_rtt_); 94 return latest_rtt_.Add(latest_rtt_);
93 } 95 }
94 96
95 QuicByteCount FixRateSender::GetCongestionWindow() const { 97 QuicByteCount FixRateSender::GetCongestionWindow() const {
96 return 0; 98 return 0;
97 } 99 }
98 100
99 } // namespace net 101 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/congestion_control/fix_rate_sender.h ('k') | net/quic/congestion_control/pacing_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698