| 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 #include "net/quic/quic_flags.h" | 7 #include "net/quic/quic_flags.h" |
| 8 | 8 |
| 9 using std::min; | 9 using std::min; |
| 10 | 10 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 } | 46 } |
| 47 | 47 |
| 48 void PacingSender::SetMaxPacingRate(QuicBandwidth max_pacing_rate) { | 48 void PacingSender::SetMaxPacingRate(QuicBandwidth max_pacing_rate) { |
| 49 max_pacing_rate_ = max_pacing_rate; | 49 max_pacing_rate_ = max_pacing_rate; |
| 50 } | 50 } |
| 51 | 51 |
| 52 void PacingSender::OnCongestionEvent(bool rtt_updated, | 52 void PacingSender::OnCongestionEvent(bool rtt_updated, |
| 53 QuicByteCount bytes_in_flight, | 53 QuicByteCount bytes_in_flight, |
| 54 const CongestionVector& acked_packets, | 54 const CongestionVector& acked_packets, |
| 55 const CongestionVector& lost_packets) { | 55 const CongestionVector& lost_packets) { |
| 56 if (FLAGS_quic_allow_noprr && !lost_packets.empty()) { |
| 57 // Clear any burst tokens when entering recovery. |
| 58 burst_tokens_ = 0; |
| 59 } |
| 56 sender_->OnCongestionEvent(rtt_updated, bytes_in_flight, acked_packets, | 60 sender_->OnCongestionEvent(rtt_updated, bytes_in_flight, acked_packets, |
| 57 lost_packets); | 61 lost_packets); |
| 58 } | 62 } |
| 59 | 63 |
| 60 bool PacingSender::OnPacketSent( | 64 bool PacingSender::OnPacketSent( |
| 61 QuicTime sent_time, | 65 QuicTime sent_time, |
| 62 QuicByteCount bytes_in_flight, | 66 QuicByteCount bytes_in_flight, |
| 63 QuicPacketNumber packet_number, | 67 QuicPacketNumber packet_number, |
| 64 QuicByteCount bytes, | 68 QuicByteCount bytes, |
| 65 HasRetransmittableData has_retransmittable_data) { | 69 HasRetransmittableData has_retransmittable_data) { |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 | 186 |
| 183 QuicByteCount PacingSender::GetSlowStartThreshold() const { | 187 QuicByteCount PacingSender::GetSlowStartThreshold() const { |
| 184 return sender_->GetSlowStartThreshold(); | 188 return sender_->GetSlowStartThreshold(); |
| 185 } | 189 } |
| 186 | 190 |
| 187 CongestionControlType PacingSender::GetCongestionControlType() const { | 191 CongestionControlType PacingSender::GetCongestionControlType() const { |
| 188 return sender_->GetCongestionControlType(); | 192 return sender_->GetCongestionControlType(); |
| 189 } | 193 } |
| 190 | 194 |
| 191 } // namespace net | 195 } // namespace net |
| OLD | NEW |