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

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

Issue 1401053005: relnote: Reduce the size of QUIC's TransmissionInfo struct based on (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@add_test_cases_to_catch_failure_104130818
Patch Set: Created 5 years, 2 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') | no next file » | 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_ack_notifier_manager.h" 9 #include "net/quic/quic_ack_notifier_manager.h"
10 #include "net/quic/quic_connection_stats.h" 10 #include "net/quic/quic_connection_stats.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 178
179 bool QuicUnackedPacketMap::HasRetransmittableFrames( 179 bool QuicUnackedPacketMap::HasRetransmittableFrames(
180 QuicPacketNumber packet_number) const { 180 QuicPacketNumber packet_number) const {
181 DCHECK_GE(packet_number, least_unacked_); 181 DCHECK_GE(packet_number, least_unacked_);
182 DCHECK_LT(packet_number, least_unacked_ + unacked_packets_.size()); 182 DCHECK_LT(packet_number, least_unacked_ + unacked_packets_.size());
183 return unacked_packets_[packet_number - least_unacked_] 183 return unacked_packets_[packet_number - least_unacked_]
184 .retransmittable_frames != nullptr; 184 .retransmittable_frames != nullptr;
185 } 185 }
186 186
187 void QuicUnackedPacketMap::NackPacket(QuicPacketNumber packet_number, 187 void QuicUnackedPacketMap::NackPacket(QuicPacketNumber packet_number,
188 QuicPacketCount min_nacks) { 188 uint16 min_nacks) {
189 DCHECK_GE(packet_number, least_unacked_); 189 DCHECK_GE(packet_number, least_unacked_);
190 DCHECK_LT(packet_number, least_unacked_ + unacked_packets_.size()); 190 DCHECK_LT(packet_number, least_unacked_ + unacked_packets_.size());
191 unacked_packets_[packet_number - least_unacked_].nack_count = max( 191 unacked_packets_[packet_number - least_unacked_].nack_count = max(
192 min_nacks, unacked_packets_[packet_number - least_unacked_].nack_count); 192 min_nacks, unacked_packets_[packet_number - least_unacked_].nack_count);
193 } 193 }
194 194
195 void QuicUnackedPacketMap::RemoveRetransmittability( 195 void QuicUnackedPacketMap::RemoveRetransmittability(
196 QuicPacketNumber packet_number) { 196 QuicPacketNumber packet_number) {
197 DCHECK_GE(packet_number, least_unacked_); 197 DCHECK_GE(packet_number, least_unacked_);
198 DCHECK_LT(packet_number, least_unacked_ + unacked_packets_.size()); 198 DCHECK_LT(packet_number, least_unacked_ + unacked_packets_.size());
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 } 385 }
386 386
387 void QuicUnackedPacketMap::PopLeastUnacked() { 387 void QuicUnackedPacketMap::PopLeastUnacked() {
388 ack_notifier_manager_->OnPacketRemoved(least_unacked_); 388 ack_notifier_manager_->OnPacketRemoved(least_unacked_);
389 389
390 unacked_packets_.pop_front(); 390 unacked_packets_.pop_front();
391 ++least_unacked_; 391 ++least_unacked_;
392 } 392 }
393 393
394 } // namespace net 394 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_unacked_packet_map.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698