| 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 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 469 QuicPacketSequenceNumber newest_transmission = | 469 QuicPacketSequenceNumber newest_transmission = |
| 470 transmission_info.all_transmissions == nullptr | 470 transmission_info.all_transmissions == nullptr |
| 471 ? sequence_number | 471 ? sequence_number |
| 472 : *transmission_info.all_transmissions->rbegin(); | 472 : *transmission_info.all_transmissions->rbegin(); |
| 473 // This packet has been revived at the receiver. If we were going to | 473 // This packet has been revived at the receiver. If we were going to |
| 474 // retransmit it, do not retransmit it anymore. | 474 // retransmit it, do not retransmit it anymore. |
| 475 pending_retransmissions_.erase(newest_transmission); | 475 pending_retransmissions_.erase(newest_transmission); |
| 476 | 476 |
| 477 // The AckNotifierManager needs to be notified for revived packets, | 477 // The AckNotifierManager needs to be notified for revived packets, |
| 478 // since it indicates the packet arrived from the appliction's perspective. | 478 // since it indicates the packet arrived from the appliction's perspective. |
| 479 if (FLAGS_quic_attach_ack_notifiers_to_packets || | 479 ack_notifier_manager_.OnPacketAcked(newest_transmission, |
| 480 transmission_info.retransmittable_frames) { | 480 delta_largest_observed); |
| 481 ack_notifier_manager_.OnPacketAcked(newest_transmission, | |
| 482 delta_largest_observed); | |
| 483 } | |
| 484 | 481 |
| 485 unacked_packets_.RemoveRetransmittability(sequence_number); | 482 unacked_packets_.RemoveRetransmittability(sequence_number); |
| 486 } | 483 } |
| 487 | 484 |
| 488 void QuicSentPacketManager::MarkPacketHandled( | 485 void QuicSentPacketManager::MarkPacketHandled( |
| 489 QuicPacketSequenceNumber sequence_number, | 486 QuicPacketSequenceNumber sequence_number, |
| 490 const TransmissionInfo& info, | 487 const TransmissionInfo& info, |
| 491 QuicTime::Delta delta_largest_observed) { | 488 QuicTime::Delta delta_largest_observed) { |
| 492 QuicPacketSequenceNumber newest_transmission = | 489 QuicPacketSequenceNumber newest_transmission = |
| 493 info.all_transmissions == nullptr ? | 490 info.all_transmissions == nullptr ? |
| (...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 947 // Set up a pacing sender with a 1 millisecond alarm granularity, the same as | 944 // Set up a pacing sender with a 1 millisecond alarm granularity, the same as |
| 948 // the default granularity of the Linux kernel's FQ qdisc. | 945 // the default granularity of the Linux kernel's FQ qdisc. |
| 949 using_pacing_ = true; | 946 using_pacing_ = true; |
| 950 send_algorithm_.reset( | 947 send_algorithm_.reset( |
| 951 new PacingSender(send_algorithm_.release(), | 948 new PacingSender(send_algorithm_.release(), |
| 952 QuicTime::Delta::FromMilliseconds(1), | 949 QuicTime::Delta::FromMilliseconds(1), |
| 953 kInitialUnpacedBurst)); | 950 kInitialUnpacedBurst)); |
| 954 } | 951 } |
| 955 | 952 |
| 956 } // namespace net | 953 } // namespace net |
| OLD | NEW |