| 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 924a7b4d9b5f09827f0a65d222ba9923a8f9470d..19549a4769c9ee8c371e3ea06db38edfa2300b93 100644
|
| --- a/net/quic/congestion_control/fix_rate_sender.cc
|
| +++ b/net/quic/congestion_control/fix_rate_sender.cc
|
| @@ -20,10 +20,14 @@ FixRateSender::FixRateSender(const QuicClock* clock)
|
| : bitrate_(QuicBandwidth::FromBytesPerSecond(kInitialBitrate)),
|
| fix_rate_leaky_bucket_(bitrate_),
|
| paced_sender_(bitrate_),
|
| - data_in_flight_(0) {
|
| + data_in_flight_(0),
|
| + latest_rtt_(QuicTime::Delta::Zero()) {
|
| DLOG(INFO) << "FixRateSender";
|
| }
|
|
|
| +FixRateSender::~FixRateSender() {
|
| +}
|
| +
|
| void FixRateSender::OnIncomingQuicCongestionFeedbackFrame(
|
| const QuicCongestionFeedbackFrame& feedback,
|
| QuicTime feedback_receive_time,
|
| @@ -42,7 +46,8 @@ void FixRateSender::OnIncomingQuicCongestionFeedbackFrame(
|
| void FixRateSender::OnIncomingAck(
|
| QuicPacketSequenceNumber /*acked_sequence_number*/,
|
| QuicByteCount bytes_acked,
|
| - QuicTime::Delta /*rtt*/) {
|
| + QuicTime::Delta rtt) {
|
| + latest_rtt_ = rtt;
|
| data_in_flight_ -= bytes_acked;
|
| }
|
|
|
| @@ -53,8 +58,7 @@ void FixRateSender::OnIncomingLoss(QuicTime /*ack_receive_time*/) {
|
| void FixRateSender::SentPacket(QuicTime sent_time,
|
| QuicPacketSequenceNumber /*sequence_number*/,
|
| QuicByteCount bytes,
|
| - bool is_retransmission,
|
| - bool /*has_retransmittable_data*/) {
|
| + bool is_retransmission) {
|
| fix_rate_leaky_bucket_.Add(sent_time, bytes);
|
| paced_sender_.SentPacket(sent_time, bytes);
|
| if (!is_retransmission) {
|
| @@ -62,8 +66,15 @@ void FixRateSender::SentPacket(QuicTime sent_time,
|
| }
|
| }
|
|
|
| -QuicTime::Delta FixRateSender::TimeUntilSend(QuicTime now,
|
| - bool /*is_retransmission*/) {
|
| +void FixRateSender::AbandoningPacket(
|
| + QuicPacketSequenceNumber /*sequence_number*/,
|
| + QuicByteCount /*abandoned_bytes*/) {
|
| +}
|
| +
|
| +QuicTime::Delta FixRateSender::TimeUntilSend(
|
| + QuicTime now,
|
| + bool /*is_retransmission*/,
|
| + bool /*has_retransmittable_data*/) {
|
| if (CongestionWindow() > fix_rate_leaky_bucket_.BytesPending(now)) {
|
| if (CongestionWindow() <= data_in_flight_) {
|
| // We need an ack before we send more.
|
| @@ -90,4 +101,9 @@ QuicBandwidth FixRateSender::BandwidthEstimate() {
|
| return bitrate_;
|
| }
|
|
|
| +QuicTime::Delta FixRateSender::SmoothedRtt() {
|
| + // TODO(satyamshekhar): Calculate and return smoothed rtt.
|
| + return latest_rtt_;
|
| +}
|
| +
|
| } // namespace net
|
|
|