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

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

Issue 1535363003: Switch to standard integer types in net/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: stddef Created 5 years 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_flags.h" 10 #include "net/quic/quic_flags.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 160
161 bool QuicUnackedPacketMap::HasRetransmittableFrames( 161 bool QuicUnackedPacketMap::HasRetransmittableFrames(
162 QuicPacketNumber packet_number) const { 162 QuicPacketNumber packet_number) const {
163 DCHECK_GE(packet_number, least_unacked_); 163 DCHECK_GE(packet_number, least_unacked_);
164 DCHECK_LT(packet_number, least_unacked_ + unacked_packets_.size()); 164 DCHECK_LT(packet_number, least_unacked_ + unacked_packets_.size());
165 return unacked_packets_[packet_number - least_unacked_] 165 return unacked_packets_[packet_number - least_unacked_]
166 .retransmittable_frames != nullptr; 166 .retransmittable_frames != nullptr;
167 } 167 }
168 168
169 void QuicUnackedPacketMap::NackPacket(QuicPacketNumber packet_number, 169 void QuicUnackedPacketMap::NackPacket(QuicPacketNumber packet_number,
170 uint16 min_nacks) { 170 uint16_t min_nacks) {
171 DCHECK_GE(packet_number, least_unacked_); 171 DCHECK_GE(packet_number, least_unacked_);
172 DCHECK_LT(packet_number, least_unacked_ + unacked_packets_.size()); 172 DCHECK_LT(packet_number, least_unacked_ + unacked_packets_.size());
173 unacked_packets_[packet_number - least_unacked_].nack_count = max( 173 unacked_packets_[packet_number - least_unacked_].nack_count = max(
174 min_nacks, unacked_packets_[packet_number - least_unacked_].nack_count); 174 min_nacks, unacked_packets_[packet_number - least_unacked_].nack_count);
175 } 175 }
176 176
177 void QuicUnackedPacketMap::RemoveRetransmittability(TransmissionInfo* info) { 177 void QuicUnackedPacketMap::RemoveRetransmittability(TransmissionInfo* info) {
178 if (track_single_retransmission_) { 178 if (track_single_retransmission_) {
179 while (info->retransmission != 0) { 179 while (info->retransmission != 0) {
180 const QuicPacketNumber retransmission = info->retransmission; 180 const QuicPacketNumber retransmission = info->retransmission;
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 } 404 }
405 } 405 }
406 return false; 406 return false;
407 } 407 }
408 408
409 QuicPacketNumber QuicUnackedPacketMap::GetLeastUnacked() const { 409 QuicPacketNumber QuicUnackedPacketMap::GetLeastUnacked() const {
410 return least_unacked_; 410 return least_unacked_;
411 } 411 }
412 412
413 } // namespace net 413 } // 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