| 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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 DVLOG(1) << ENDPOINT << "Got an ack for packet " << packet_number; | 319 DVLOG(1) << ENDPOINT << "Got an ack for packet " << packet_number; |
| 320 // If data is associated with the most recent transmission of this | 320 // If data is associated with the most recent transmission of this |
| 321 // packet, then inform the caller. | 321 // packet, then inform the caller. |
| 322 if (it->in_flight) { | 322 if (it->in_flight) { |
| 323 packets_acked_.push_back(std::make_pair(packet_number, it->bytes_sent)); | 323 packets_acked_.push_back(std::make_pair(packet_number, it->bytes_sent)); |
| 324 } | 324 } |
| 325 MarkPacketHandled(packet_number, *it, delta_largest_observed); | 325 MarkPacketHandled(packet_number, *it, delta_largest_observed); |
| 326 } | 326 } |
| 327 | 327 |
| 328 // Discard any retransmittable frames associated with revived packets. | 328 // Discard any retransmittable frames associated with revived packets. |
| 329 for (PacketNumberSet::const_iterator revived_it = | 329 if (ack_frame.latest_revived_packet != 0) { |
| 330 ack_frame.revived_packets.begin(); | 330 MarkPacketRevived(ack_frame.latest_revived_packet, delta_largest_observed); |
| 331 revived_it != ack_frame.revived_packets.end(); ++revived_it) { | |
| 332 MarkPacketRevived(*revived_it, delta_largest_observed); | |
| 333 } | 331 } |
| 334 } | 332 } |
| 335 | 333 |
| 336 bool QuicSentPacketManager::HasRetransmittableFrames( | 334 bool QuicSentPacketManager::HasRetransmittableFrames( |
| 337 QuicPacketNumber packet_number) const { | 335 QuicPacketNumber packet_number) const { |
| 338 return unacked_packets_.HasRetransmittableFrames(packet_number); | 336 return unacked_packets_.HasRetransmittableFrames(packet_number); |
| 339 } | 337 } |
| 340 | 338 |
| 341 void QuicSentPacketManager::RetransmitUnackedPackets( | 339 void QuicSentPacketManager::RetransmitUnackedPackets( |
| 342 TransmissionType retransmission_type) { | 340 TransmissionType retransmission_type) { |
| (...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 931 // Set up a pacing sender with a 1 millisecond alarm granularity, the same as | 929 // Set up a pacing sender with a 1 millisecond alarm granularity, the same as |
| 932 // the default granularity of the Linux kernel's FQ qdisc. | 930 // the default granularity of the Linux kernel's FQ qdisc. |
| 933 using_pacing_ = true; | 931 using_pacing_ = true; |
| 934 send_algorithm_.reset( | 932 send_algorithm_.reset( |
| 935 new PacingSender(send_algorithm_.release(), | 933 new PacingSender(send_algorithm_.release(), |
| 936 QuicTime::Delta::FromMilliseconds(1), | 934 QuicTime::Delta::FromMilliseconds(1), |
| 937 kInitialUnpacedBurst)); | 935 kInitialUnpacedBurst)); |
| 938 } | 936 } |
| 939 | 937 |
| 940 } // namespace net | 938 } // namespace net |
| OLD | NEW |