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 "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
9 #include "net/quic/congestion_control/pacing_sender.h" | 9 #include "net/quic/congestion_control/pacing_sender.h" |
10 #include "net/quic/quic_ack_notifier_manager.h" | 10 #include "net/quic/quic_ack_notifier_manager.h" |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 } | 309 } |
310 } | 310 } |
311 } | 311 } |
312 } | 312 } |
313 | 313 |
314 void QuicSentPacketManager::MarkForRetransmission( | 314 void QuicSentPacketManager::MarkForRetransmission( |
315 QuicPacketSequenceNumber sequence_number, | 315 QuicPacketSequenceNumber sequence_number, |
316 TransmissionType transmission_type) { | 316 TransmissionType transmission_type) { |
317 TransmissionInfo* transmission_info = | 317 TransmissionInfo* transmission_info = |
318 FindOrNull(unacked_packets_, sequence_number); | 318 FindOrNull(unacked_packets_, sequence_number); |
319 if (transmission_info == NULL) { | 319 if (transmission_info != NULL) { |
320 LOG(DFATAL) << "transmission_info == NULL"; | 320 LOG_IF(DFATAL, transmission_info->retransmittable_frames == NULL); |
| 321 LOG_IF(DFATAL, transmission_info->sent_time == QuicTime::Zero()); |
321 } else { | 322 } else { |
322 if (transmission_info->retransmittable_frames == NULL) { | 323 LOG(DFATAL) << "Unable to retansmit packet: " << sequence_number; |
323 LOG(DFATAL) << "transmission_info->retransmittable_frames == NULL"; | |
324 } | |
325 if (transmission_info->sent_time == QuicTime::Zero()) { | |
326 LOG(DFATAL) << "transmission_info->sent_time == QuicTime::Zero()"; | |
327 } | |
328 } | 324 } |
329 // TODO(ianswett): Currently the RTO can fire while there are pending NACK | 325 // TODO(ianswett): Currently the RTO can fire while there are pending NACK |
330 // retransmissions for the same data, which is not ideal. | 326 // retransmissions for the same data, which is not ideal. |
331 if (ContainsKey(pending_retransmissions_, sequence_number)) { | 327 if (ContainsKey(pending_retransmissions_, sequence_number)) { |
332 return; | 328 return; |
333 } | 329 } |
334 | 330 |
335 pending_retransmissions_[sequence_number] = transmission_type; | 331 pending_retransmissions_[sequence_number] = transmission_type; |
336 } | 332 } |
337 | 333 |
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
968 } | 964 } |
969 previous_transmissions->erase(sequence_number); | 965 previous_transmissions->erase(sequence_number); |
970 if (previous_transmissions->size() == 1) { | 966 if (previous_transmissions->size() == 1) { |
971 QuicPacketSequenceNumber current = *previous_transmissions->begin(); | 967 QuicPacketSequenceNumber current = *previous_transmissions->begin(); |
972 unacked_packets_[current].previous_transmissions = NULL; | 968 unacked_packets_[current].previous_transmissions = NULL; |
973 delete previous_transmissions; | 969 delete previous_transmissions; |
974 } | 970 } |
975 } | 971 } |
976 | 972 |
977 } // namespace net | 973 } // namespace net |
OLD | NEW |