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

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

Issue 2001183002: Deprecate FLAGS_quic_simplify_loss_detection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@122429210
Patch Set: Created 4 years, 7 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_bug_tracker.h" 9 #include "net/quic/quic_bug_tracker.h"
10 #include "net/quic/quic_connection_stats.h" 10 #include "net/quic/quic_connection_stats.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 } 132 }
133 133
134 bool QuicUnackedPacketMap::HasRetransmittableFrames( 134 bool QuicUnackedPacketMap::HasRetransmittableFrames(
135 QuicPacketNumber packet_number) const { 135 QuicPacketNumber packet_number) const {
136 DCHECK_GE(packet_number, least_unacked_); 136 DCHECK_GE(packet_number, least_unacked_);
137 DCHECK_LT(packet_number, least_unacked_ + unacked_packets_.size()); 137 DCHECK_LT(packet_number, least_unacked_ + unacked_packets_.size());
138 return !unacked_packets_[packet_number - least_unacked_] 138 return !unacked_packets_[packet_number - least_unacked_]
139 .retransmittable_frames.empty(); 139 .retransmittable_frames.empty();
140 } 140 }
141 141
142 void QuicUnackedPacketMap::NackPacket(QuicPacketNumber packet_number,
143 uint16_t min_nacks) {
144 DCHECK(!FLAGS_quic_simplify_loss_detection);
145 DCHECK_GE(packet_number, least_unacked_);
146 DCHECK_LT(packet_number, least_unacked_ + unacked_packets_.size());
147 unacked_packets_[packet_number - least_unacked_].nack_count = max(
148 min_nacks, unacked_packets_[packet_number - least_unacked_].nack_count);
149 }
150
151 void QuicUnackedPacketMap::RemoveRetransmittability(TransmissionInfo* info) { 142 void QuicUnackedPacketMap::RemoveRetransmittability(TransmissionInfo* info) {
152 while (info->retransmission != 0) { 143 while (info->retransmission != 0) {
153 const QuicPacketNumber retransmission = info->retransmission; 144 const QuicPacketNumber retransmission = info->retransmission;
154 info->retransmission = 0; 145 info->retransmission = 0;
155 info = &unacked_packets_[retransmission - least_unacked_]; 146 info = &unacked_packets_[retransmission - least_unacked_];
156 } 147 }
157 MaybeRemoveRetransmittableFrames(info); 148 MaybeRemoveRetransmittableFrames(info);
158 } 149 }
159 150
160 void QuicUnackedPacketMap::RemoveRetransmittability( 151 void QuicUnackedPacketMap::RemoveRetransmittability(
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 } 343 }
353 } 344 }
354 return false; 345 return false;
355 } 346 }
356 347
357 QuicPacketNumber QuicUnackedPacketMap::GetLeastUnacked() const { 348 QuicPacketNumber QuicUnackedPacketMap::GetLeastUnacked() const {
358 return least_unacked_; 349 return least_unacked_;
359 } 350 }
360 351
361 } // namespace net 352 } // 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