OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/quic_sent_packet_manager.h" | 5 #include "net/quic/quic_sent_packet_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 } | 137 } |
138 } | 138 } |
139 | 139 |
140 // TODO(ianswett): Combine this method with OnPacketSent once packets are always | 140 // TODO(ianswett): Combine this method with OnPacketSent once packets are always |
141 // sent in order and the connection tracks RetransmittableFrames for longer. | 141 // sent in order and the connection tracks RetransmittableFrames for longer. |
142 void QuicSentPacketManager::OnSerializedPacket( | 142 void QuicSentPacketManager::OnSerializedPacket( |
143 const SerializedPacket& serialized_packet) { | 143 const SerializedPacket& serialized_packet) { |
144 if (serialized_packet.retransmittable_frames) { | 144 if (serialized_packet.retransmittable_frames) { |
145 ack_notifier_manager_.OnSerializedPacket(serialized_packet); | 145 ack_notifier_manager_.OnSerializedPacket(serialized_packet); |
146 } | 146 } |
| 147 unacked_packets_.AddPacket(serialized_packet); |
147 | 148 |
148 unacked_packets_.AddPacket(serialized_packet); | 149 if (debug_delegate_ != NULL) { |
| 150 debug_delegate_->OnSerializedPacket(serialized_packet); |
| 151 } |
149 } | 152 } |
150 | 153 |
151 void QuicSentPacketManager::OnRetransmittedPacket( | 154 void QuicSentPacketManager::OnRetransmittedPacket( |
152 QuicPacketSequenceNumber old_sequence_number, | 155 QuicPacketSequenceNumber old_sequence_number, |
153 QuicPacketSequenceNumber new_sequence_number) { | 156 QuicPacketSequenceNumber new_sequence_number) { |
154 TransmissionType transmission_type; | 157 TransmissionType transmission_type; |
155 PendingRetransmissionMap::iterator it = | 158 PendingRetransmissionMap::iterator it = |
156 pending_retransmissions_.find(old_sequence_number); | 159 pending_retransmissions_.find(old_sequence_number); |
157 if (it != pending_retransmissions_.end()) { | 160 if (it != pending_retransmissions_.end()) { |
158 transmission_type = it->second; | 161 transmission_type = it->second; |
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
889 | 892 |
890 // Set up a pacing sender with a 5 millisecond alarm granularity. | 893 // Set up a pacing sender with a 5 millisecond alarm granularity. |
891 using_pacing_ = true; | 894 using_pacing_ = true; |
892 send_algorithm_.reset( | 895 send_algorithm_.reset( |
893 new PacingSender(send_algorithm_.release(), | 896 new PacingSender(send_algorithm_.release(), |
894 QuicTime::Delta::FromMilliseconds(5), | 897 QuicTime::Delta::FromMilliseconds(5), |
895 kInitialUnpacedBurst)); | 898 kInitialUnpacedBurst)); |
896 } | 899 } |
897 | 900 |
898 } // namespace net | 901 } // namespace net |
OLD | NEW |