| 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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 } | 314 } |
| 315 // Packet was acked, so remove it from our unacked packet list. | 315 // Packet was acked, so remove it from our unacked packet list. |
| 316 DVLOG(1) << ENDPOINT << "Got an ack for packet " << packet_number; | 316 DVLOG(1) << ENDPOINT << "Got an ack for packet " << packet_number; |
| 317 // If data is associated with the most recent transmission of this | 317 // If data is associated with the most recent transmission of this |
| 318 // packet, then inform the caller. | 318 // packet, then inform the caller. |
| 319 if (it->in_flight) { | 319 if (it->in_flight) { |
| 320 packets_acked_.push_back(std::make_pair(packet_number, it->bytes_sent)); | 320 packets_acked_.push_back(std::make_pair(packet_number, it->bytes_sent)); |
| 321 } | 321 } |
| 322 MarkPacketHandled(packet_number, &(*it), ack_delay_time); | 322 MarkPacketHandled(packet_number, &(*it), ack_delay_time); |
| 323 } | 323 } |
| 324 | |
| 325 // Discard any retransmittable frames associated with revived packets. | |
| 326 if (ack_frame.latest_revived_packet != 0) { | |
| 327 MarkPacketNotRetransmittable(ack_frame.latest_revived_packet, | |
| 328 ack_delay_time); | |
| 329 } | |
| 330 } | 324 } |
| 331 | 325 |
| 332 bool QuicSentPacketManager::HasRetransmittableFrames( | 326 bool QuicSentPacketManager::HasRetransmittableFrames( |
| 333 QuicPacketNumber packet_number) const { | 327 QuicPacketNumber packet_number) const { |
| 334 return unacked_packets_.HasRetransmittableFrames(packet_number); | 328 return unacked_packets_.HasRetransmittableFrames(packet_number); |
| 335 } | 329 } |
| 336 | 330 |
| 337 void QuicSentPacketManager::RetransmitUnackedPackets( | 331 void QuicSentPacketManager::RetransmitUnackedPackets( |
| 338 TransmissionType retransmission_type) { | 332 TransmissionType retransmission_type) { |
| 339 DCHECK(retransmission_type == ALL_UNACKED_RETRANSMISSION || | 333 DCHECK(retransmission_type == ALL_UNACKED_RETRANSMISSION || |
| (...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 974 TransmissionInfo* QuicSentPacketManager::GetMutableTransmissionInfo( | 968 TransmissionInfo* QuicSentPacketManager::GetMutableTransmissionInfo( |
| 975 QuicPacketNumber packet_number) { | 969 QuicPacketNumber packet_number) { |
| 976 return unacked_packets_.GetMutableTransmissionInfo(packet_number); | 970 return unacked_packets_.GetMutableTransmissionInfo(packet_number); |
| 977 } | 971 } |
| 978 | 972 |
| 979 void QuicSentPacketManager::RemoveObsoletePackets() { | 973 void QuicSentPacketManager::RemoveObsoletePackets() { |
| 980 unacked_packets_.RemoveObsoletePackets(); | 974 unacked_packets_.RemoveObsoletePackets(); |
| 981 } | 975 } |
| 982 | 976 |
| 983 } // namespace net | 977 } // namespace net |
| OLD | NEW |