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

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

Issue 1190823003: Remove dependency on headers stream from QuicSession. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Final_0616
Patch Set: deleted an include Created 5 years, 6 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_stream_sequencer_test.cc ('k') | net/quic/reliable_quic_stream_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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::CancelRetransmissionsForStream( 303 void QuicUnackedPacketMap::CancelRetransmissionsForStream(
304 QuicStreamId stream_id) { 304 QuicStreamId stream_id) {
305 if (stream_id == kCryptoStreamId || stream_id == kHeadersStreamId) {
306 LOG(DFATAL) << "Special streams must always retransmit data: " << stream_id;
307 return;
308 }
309 QuicPacketSequenceNumber sequence_number = least_unacked_; 305 QuicPacketSequenceNumber sequence_number = least_unacked_;
310 for (UnackedPacketMap::const_iterator it = unacked_packets_.begin(); 306 for (UnackedPacketMap::const_iterator it = unacked_packets_.begin();
311 it != unacked_packets_.end(); ++it, ++sequence_number) { 307 it != unacked_packets_.end(); ++it, ++sequence_number) {
312 RetransmittableFrames* retransmittable_frames = it->retransmittable_frames; 308 RetransmittableFrames* retransmittable_frames = it->retransmittable_frames;
313 if (!retransmittable_frames) { 309 if (!retransmittable_frames) {
314 continue; 310 continue;
315 } 311 }
316 retransmittable_frames->RemoveFramesForStream(stream_id); 312 retransmittable_frames->RemoveFramesForStream(stream_id);
317 if (retransmittable_frames->frames().empty()) { 313 if (retransmittable_frames->frames().empty()) {
318 RemoveRetransmittability(sequence_number); 314 RemoveRetransmittability(sequence_number);
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 } 381 }
386 } 382 }
387 return false; 383 return false;
388 } 384 }
389 385
390 QuicPacketSequenceNumber QuicUnackedPacketMap::GetLeastUnacked() const { 386 QuicPacketSequenceNumber QuicUnackedPacketMap::GetLeastUnacked() const {
391 return least_unacked_; 387 return least_unacked_;
392 } 388 }
393 389
394 } // namespace net 390 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_stream_sequencer_test.cc ('k') | net/quic/reliable_quic_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698