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

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

Issue 2515613002: deprecate FLAGS_quic_disable_pre_34 (Closed)
Patch Set: Created 4 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/core/quic_sent_packet_manager.h" 5 #include "net/quic/core/quic_sent_packet_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 // incoming_ack shows they've been seen by the peer. 302 // incoming_ack shows they've been seen by the peer.
303 QuicTime::Delta ack_delay_time = ack_frame.ack_delay_time; 303 QuicTime::Delta ack_delay_time = ack_frame.ack_delay_time;
304 QuicPacketNumber packet_number = unacked_packets_.GetLeastUnacked(); 304 QuicPacketNumber packet_number = unacked_packets_.GetLeastUnacked();
305 for (QuicUnackedPacketMap::iterator it = unacked_packets_.begin(); 305 for (QuicUnackedPacketMap::iterator it = unacked_packets_.begin();
306 it != unacked_packets_.end(); ++it, ++packet_number) { 306 it != unacked_packets_.end(); ++it, ++packet_number) {
307 if (packet_number > ack_frame.largest_observed) { 307 if (packet_number > ack_frame.largest_observed) {
308 // These packets are still in flight. 308 // These packets are still in flight.
309 break; 309 break;
310 } 310 }
311 311
312 if ((ack_frame.missing && ack_frame.packets.Contains(packet_number)) || 312 if (!ack_frame.packets.Contains(packet_number)) {
313 (!ack_frame.missing && !ack_frame.packets.Contains(packet_number))) {
314 // Packet is still missing. 313 // Packet is still missing.
315 continue; 314 continue;
316 } 315 }
317 // Packet was acked, so remove it from our unacked packet list. 316 // Packet was acked, so remove it from our unacked packet list.
318 DVLOG(1) << ENDPOINT << "Got an ack for packet " << packet_number; 317 DVLOG(1) << ENDPOINT << "Got an ack for packet " << packet_number;
319 // If data is associated with the most recent transmission of this 318 // If data is associated with the most recent transmission of this
320 // packet, then inform the caller. 319 // packet, then inform the caller.
321 if (it->in_flight) { 320 if (it->in_flight) {
322 packets_acked_.push_back(std::make_pair(packet_number, it->bytes_sent)); 321 packets_acked_.push_back(std::make_pair(packet_number, it->bytes_sent));
323 } else if (!it->is_unackable) { 322 } else if (!it->is_unackable) {
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
1019 1018
1020 void QuicSentPacketManager::RemoveObsoletePackets() { 1019 void QuicSentPacketManager::RemoveObsoletePackets() {
1021 unacked_packets_.RemoveObsoletePackets(); 1020 unacked_packets_.RemoveObsoletePackets();
1022 } 1021 }
1023 1022
1024 void QuicSentPacketManager::OnApplicationLimited() { 1023 void QuicSentPacketManager::OnApplicationLimited() {
1025 send_algorithm_->OnApplicationLimited(unacked_packets_.bytes_in_flight()); 1024 send_algorithm_->OnApplicationLimited(unacked_packets_.bytes_in_flight());
1026 } 1025 }
1027 1026
1028 } // namespace net 1027 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_sent_entropy_manager_test.cc ('k') | net/quic/core/quic_sent_packet_manager_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698