Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Side by Side Diff: net/quic/quic_sent_packet_manager.cc

Issue 1431693002: Change QuicAckFrame's revived_packets to be a single QuicPacketNumber. QUIC now ignores all but the… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@106724344
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « net/quic/quic_received_packet_manager_test.cc ('k') | net/quic/quic_sent_packet_manager_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698