| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/pacing_sender.h" | 5 #include "net/quic/congestion_control/pacing_sender.h" |
| 6 | 6 |
| 7 namespace net { | 7 namespace net { |
| 8 | 8 |
| 9 PacingSender::PacingSender(SendAlgorithmInterface* sender, | 9 PacingSender::PacingSender(SendAlgorithmInterface* sender, |
| 10 QuicTime::Delta alarm_granularity) | 10 QuicTime::Delta alarm_granularity) |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 } | 81 } |
| 82 } | 82 } |
| 83 return sender_->OnPacketSent(sent_time, bytes_in_flight, sequence_number, | 83 return sender_->OnPacketSent(sent_time, bytes_in_flight, sequence_number, |
| 84 bytes, has_retransmittable_data); | 84 bytes, has_retransmittable_data); |
| 85 } | 85 } |
| 86 | 86 |
| 87 void PacingSender::OnRetransmissionTimeout(bool packets_retransmitted) { | 87 void PacingSender::OnRetransmissionTimeout(bool packets_retransmitted) { |
| 88 sender_->OnRetransmissionTimeout(packets_retransmitted); | 88 sender_->OnRetransmissionTimeout(packets_retransmitted); |
| 89 } | 89 } |
| 90 | 90 |
| 91 void PacingSender::RevertRetransmissionTimeout() { |
| 92 sender_->RevertRetransmissionTimeout(); |
| 93 } |
| 94 |
| 91 QuicTime::Delta PacingSender::TimeUntilSend( | 95 QuicTime::Delta PacingSender::TimeUntilSend( |
| 92 QuicTime now, | 96 QuicTime now, |
| 93 QuicByteCount bytes_in_flight, | 97 QuicByteCount bytes_in_flight, |
| 94 HasRetransmittableData has_retransmittable_data) const { | 98 HasRetransmittableData has_retransmittable_data) const { |
| 95 QuicTime::Delta time_until_send = | 99 QuicTime::Delta time_until_send = |
| 96 sender_->TimeUntilSend(now, bytes_in_flight, has_retransmittable_data); | 100 sender_->TimeUntilSend(now, bytes_in_flight, has_retransmittable_data); |
| 97 if (!has_valid_rtt_) { | 101 if (!has_valid_rtt_) { |
| 98 // Don't pace if we don't have an updated RTT estimate. | 102 // Don't pace if we don't have an updated RTT estimate. |
| 99 return time_until_send; | 103 return time_until_send; |
| 100 } | 104 } |
| (...skipping 28 matching lines...) Expand all Loading... |
| 129 | 133 |
| 130 QuicTime::Delta PacingSender::RetransmissionDelay() const { | 134 QuicTime::Delta PacingSender::RetransmissionDelay() const { |
| 131 return sender_->RetransmissionDelay(); | 135 return sender_->RetransmissionDelay(); |
| 132 } | 136 } |
| 133 | 137 |
| 134 QuicByteCount PacingSender::GetCongestionWindow() const { | 138 QuicByteCount PacingSender::GetCongestionWindow() const { |
| 135 return sender_->GetCongestionWindow(); | 139 return sender_->GetCongestionWindow(); |
| 136 } | 140 } |
| 137 | 141 |
| 138 } // namespace net | 142 } // namespace net |
| OLD | NEW |