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

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

Issue 1013583002: Make the SentPacketManager remove pending retransmissions for reset (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Replace_CID_with_connection_id_88463135
Patch Set: Created 5 years, 9 months 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
« no previous file with comments | « net/quic/quic_unacked_packet_map.h ('k') | net/quic/quic_unacked_packet_map_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_unacked_packet_map.h" 5 #include "net/quic/quic_unacked_packet_map.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "net/quic/quic_connection_stats.h" 9 #include "net/quic/quic_connection_stats.h"
10 #include "net/quic/quic_utils_chromium.h" 10 #include "net/quic/quic_utils_chromium.h"
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 DCHECK_GE(sequence_number, least_unacked_); 293 DCHECK_GE(sequence_number, least_unacked_);
294 DCHECK_LT(sequence_number, least_unacked_ + unacked_packets_.size()); 294 DCHECK_LT(sequence_number, least_unacked_ + unacked_packets_.size());
295 TransmissionInfo* info = &unacked_packets_[sequence_number - least_unacked_]; 295 TransmissionInfo* info = &unacked_packets_[sequence_number - least_unacked_];
296 if (info->in_flight) { 296 if (info->in_flight) {
297 LOG_IF(DFATAL, bytes_in_flight_ < info->bytes_sent); 297 LOG_IF(DFATAL, bytes_in_flight_ < info->bytes_sent);
298 bytes_in_flight_ -= info->bytes_sent; 298 bytes_in_flight_ -= info->bytes_sent;
299 info->in_flight = false; 299 info->in_flight = false;
300 } 300 }
301 } 301 }
302 302
303 void QuicUnackedPacketMap::StopRetransmissionForStream(QuicStreamId stream_id) { 303 void QuicUnackedPacketMap::CancelRetransmissionsForStream(
304 QuicStreamId stream_id) {
304 if (stream_id == kCryptoStreamId || stream_id == kHeadersStreamId) { 305 if (stream_id == kCryptoStreamId || stream_id == kHeadersStreamId) {
305 LOG(DFATAL) << "Special streams must always retransmit data: " << stream_id; 306 LOG(DFATAL) << "Special streams must always retransmit data: " << stream_id;
306 return; 307 return;
307 } 308 }
308 QuicPacketSequenceNumber sequence_number = least_unacked_; 309 QuicPacketSequenceNumber sequence_number = least_unacked_;
309 for (UnackedPacketMap::const_iterator it = unacked_packets_.begin(); 310 for (UnackedPacketMap::const_iterator it = unacked_packets_.begin();
310 it != unacked_packets_.end(); ++it, ++sequence_number) { 311 it != unacked_packets_.end(); ++it, ++sequence_number) {
311 RetransmittableFrames* retransmittable_frames = it->retransmittable_frames; 312 RetransmittableFrames* retransmittable_frames = it->retransmittable_frames;
312 if (!retransmittable_frames) { 313 if (!retransmittable_frames) {
313 continue; 314 continue;
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 } 385 }
385 } 386 }
386 return false; 387 return false;
387 } 388 }
388 389
389 QuicPacketSequenceNumber QuicUnackedPacketMap::GetLeastUnacked() const { 390 QuicPacketSequenceNumber QuicUnackedPacketMap::GetLeastUnacked() const {
390 return least_unacked_; 391 return least_unacked_;
391 } 392 }
392 393
393 } // namespace net 394 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_unacked_packet_map.h ('k') | net/quic/quic_unacked_packet_map_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698