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 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 | 445 |
446 unacked_packets_.RemoveRetransmittability(sequence_number); | 446 unacked_packets_.RemoveRetransmittability(sequence_number); |
447 } | 447 } |
448 | 448 |
449 void QuicSentPacketManager::MarkPacketHandled( | 449 void QuicSentPacketManager::MarkPacketHandled( |
450 QuicPacketSequenceNumber sequence_number, | 450 QuicPacketSequenceNumber sequence_number, |
451 const TransmissionInfo& info, | 451 const TransmissionInfo& info, |
452 QuicTime::Delta delta_largest_observed) { | 452 QuicTime::Delta delta_largest_observed) { |
453 QuicPacketSequenceNumber newest_transmission = | 453 QuicPacketSequenceNumber newest_transmission = |
454 info.all_transmissions == nullptr ? sequence_number | 454 info.all_transmissions == nullptr ? sequence_number |
455 : *info.all_transmissions->rbegin(); | 455 : *info.all_transmissions->rbegin(); |
456 // Remove the most recent packet, if it is pending retransmission. | 456 // Remove the most recent packet, if it is pending retransmission. |
457 pending_retransmissions_.erase(newest_transmission); | 457 pending_retransmissions_.erase(newest_transmission); |
458 | 458 |
459 // The AckNotifierManager needs to be notified about the most recent | 459 // The AckNotifierManager needs to be notified about the most recent |
460 // transmission, since that's the one only one it tracks. | 460 // transmission, since that's the one only one it tracks. |
461 ack_notifier_manager_.OnPacketAcked(newest_transmission, | 461 ack_notifier_manager_.OnPacketAcked(newest_transmission, |
462 delta_largest_observed); | 462 delta_largest_observed); |
463 if (newest_transmission != sequence_number) { | 463 if (newest_transmission != sequence_number) { |
464 RecordSpuriousRetransmissions(*info.all_transmissions, sequence_number); | 464 RecordSpuriousRetransmissions(*info.all_transmissions, sequence_number); |
465 // Remove the most recent packet from flight if it's a crypto handshake | 465 // Remove the most recent packet from flight if it's a crypto handshake |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
873 | 873 |
874 // Set up a pacing sender with a 5 millisecond alarm granularity. | 874 // Set up a pacing sender with a 5 millisecond alarm granularity. |
875 using_pacing_ = true; | 875 using_pacing_ = true; |
876 send_algorithm_.reset( | 876 send_algorithm_.reset( |
877 new PacingSender(send_algorithm_.release(), | 877 new PacingSender(send_algorithm_.release(), |
878 QuicTime::Delta::FromMilliseconds(5), | 878 QuicTime::Delta::FromMilliseconds(5), |
879 kInitialUnpacedBurst)); | 879 kInitialUnpacedBurst)); |
880 } | 880 } |
881 | 881 |
882 } // namespace net | 882 } // namespace net |
OLD | NEW |