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

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

Issue 968233004: Land Recent QUIC Changes until 03/02/2015. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cleanup
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_time_wait_list_manager.cc ('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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 const TransmissionInfo& info) const { 266 const TransmissionInfo& info) const {
267 return !IsPacketUsefulForMeasuringRtt(sequence_number, info) && 267 return !IsPacketUsefulForMeasuringRtt(sequence_number, info) &&
268 !IsPacketUsefulForCongestionControl(info) && 268 !IsPacketUsefulForCongestionControl(info) &&
269 !IsPacketUsefulForRetransmittableData(info); 269 !IsPacketUsefulForRetransmittableData(info);
270 } 270 }
271 271
272 bool QuicUnackedPacketMap::IsPacketRemovable( 272 bool QuicUnackedPacketMap::IsPacketRemovable(
273 QuicPacketSequenceNumber sequence_number, 273 QuicPacketSequenceNumber sequence_number,
274 const TransmissionInfo& info) const { 274 const TransmissionInfo& info) const {
275 return (!IsPacketUsefulForMeasuringRtt(sequence_number, info) || 275 return (!IsPacketUsefulForMeasuringRtt(sequence_number, info) ||
276 unacked_packets_.size() > kMaxTcpCongestionWindow) && 276 unacked_packets_.size() > kMaxTrackedPackets / 2) &&
277 !IsPacketUsefulForCongestionControl(info) && 277 !IsPacketUsefulForCongestionControl(info) &&
278 !IsPacketUsefulForRetransmittableData(info); 278 !IsPacketUsefulForRetransmittableData(info);
279 } 279 }
280 280
281 bool QuicUnackedPacketMap::IsUnacked( 281 bool QuicUnackedPacketMap::IsUnacked(
282 QuicPacketSequenceNumber sequence_number) const { 282 QuicPacketSequenceNumber sequence_number) const {
283 if (sequence_number < least_unacked_ || 283 if (sequence_number < least_unacked_ ||
284 sequence_number >= least_unacked_ + unacked_packets_.size()) { 284 sequence_number >= least_unacked_ + unacked_packets_.size()) {
285 return false; 285 return false;
286 } 286 }
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 } 377 }
378 } 378 }
379 return false; 379 return false;
380 } 380 }
381 381
382 QuicPacketSequenceNumber QuicUnackedPacketMap::GetLeastUnacked() const { 382 QuicPacketSequenceNumber QuicUnackedPacketMap::GetLeastUnacked() const {
383 return least_unacked_; 383 return least_unacked_;
384 } 384 }
385 385
386 } // namespace net 386 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_time_wait_list_manager.cc ('k') | net/quic/quic_unacked_packet_map_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698