Chromium Code Reviews| Index: net/quic/quic_sent_packet_manager.cc |
| diff --git a/net/quic/quic_sent_packet_manager.cc b/net/quic/quic_sent_packet_manager.cc |
| index b31899b8a57587c1ebe6d27623d9d1a7e3785087..e68cf5731a1143c698344cc34892601f9520c119 100644 |
| --- a/net/quic/quic_sent_packet_manager.cc |
| +++ b/net/quic/quic_sent_packet_manager.cc |
| @@ -6,6 +6,7 @@ |
| #include "base/logging.h" |
| #include "base/stl_util.h" |
| +#include "net/quic/quic_ack_notifier_manager.h" |
| using std::make_pair; |
| @@ -58,6 +59,8 @@ void QuicSentPacketManager::OnSerializedPacket( |
| return; |
| } |
| + ack_notifier_manager_.OnSerializedPacket(serialized_packet); |
| + |
| DCHECK(unacked_packets_.empty() || |
| unacked_packets_.rbegin()->first < |
| serialized_packet.sequence_number); |
| @@ -88,6 +91,13 @@ void QuicSentPacketManager::OnRetransmittedPacket( |
| RetransmittableFrames* frames = unacked_packets_[old_sequence_number]; |
| DCHECK(frames); |
| + |
| + // A notifier may be waiting to hear about ACKs for the original sequence |
| + // number. Inform them that the sequence number has changed. |
| + ack_notifier_manager_.UpdateSequenceNumber(old_sequence_number, |
| + new_sequence_number); |
| + |
| + |
|
wtc
2013/10/01 14:06:59
Nit: delete one blank line.
ramant (doing other things)
2013/10/01 22:29:32
Done.
|
| if (FLAGS_track_retransmission_history) { |
| // We keep the old packet in the unacked packet list until it, or one of |
| // the retransmissions of it are acked. |
| @@ -126,6 +136,11 @@ void QuicSentPacketManager::OnIncomingAck( |
| SequenceNumberSet* acked_packets) { |
| HandleAckForSentPackets(received_info, is_truncated_ack, acked_packets); |
| HandleAckForSentFecPackets(received_info, acked_packets); |
| + |
| + if (acked_packets->size() > 0) { |
| + // The AckNotifierManager should be informed of every ACKed sequence number. |
| + ack_notifier_manager_.OnIncomingAck(*acked_packets); |
| + } |
| } |
| void QuicSentPacketManager::DiscardUnackedPacket( |