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

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

Issue 556103002: Simplify QuicUnackedPacketMap's RemovePreviousTransmissions by always (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@discard_old_packets_74814618
Patch Set: Created 6 years, 3 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 | « no previous file | net/quic/quic_unacked_packet_map.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_sent_packet_manager.h" 5 #include "net/quic/quic_sent_packet_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 send_algorithm_->InRecovery(), 203 send_algorithm_->InRecovery(),
204 send_algorithm_->InSlowStart(), 204 send_algorithm_->InSlowStart(),
205 send_algorithm_->BandwidthEstimate(), 205 send_algorithm_->BandwidthEstimate(),
206 ack_receive_time, 206 ack_receive_time,
207 clock_->WallNow(), 207 clock_->WallNow(),
208 rtt_stats_.SmoothedRtt()); 208 rtt_stats_.SmoothedRtt());
209 209
210 // If we have received a truncated ack, then we need to clear out some 210 // If we have received a truncated ack, then we need to clear out some
211 // previous transmissions to allow the peer to actually ACK new packets. 211 // previous transmissions to allow the peer to actually ACK new packets.
212 if (ack_frame.is_truncated) { 212 if (ack_frame.is_truncated) {
213 unacked_packets_.ClearPreviousRetransmissions( 213 unacked_packets_.ClearAllPreviousRetransmissions();
214 ack_frame.missing_packets.size() / 2);
215 } 214 }
216 215
217 // Anytime we are making forward progress and have a new RTT estimate, reset 216 // Anytime we are making forward progress and have a new RTT estimate, reset
218 // the backoff counters. 217 // the backoff counters.
219 if (largest_observed_acked) { 218 if (largest_observed_acked) {
220 // Reset all retransmit counters any time a new packet is acked. 219 // Reset all retransmit counters any time a new packet is acked.
221 consecutive_rto_count_ = 0; 220 consecutive_rto_count_ = 0;
222 consecutive_tlp_count_ = 0; 221 consecutive_tlp_count_ = 0;
223 consecutive_crypto_retransmission_count_ = 0; 222 consecutive_crypto_retransmission_count_ = 0;
224 } 223 }
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after
873 872
874 // Set up a pacing sender with a 5 millisecond alarm granularity. 873 // Set up a pacing sender with a 5 millisecond alarm granularity.
875 using_pacing_ = true; 874 using_pacing_ = true;
876 send_algorithm_.reset( 875 send_algorithm_.reset(
877 new PacingSender(send_algorithm_.release(), 876 new PacingSender(send_algorithm_.release(),
878 QuicTime::Delta::FromMilliseconds(5), 877 QuicTime::Delta::FromMilliseconds(5),
879 kInitialUnpacedBurst)); 878 kInitialUnpacedBurst));
880 } 879 }
881 880
882 } // namespace net 881 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/quic/quic_unacked_packet_map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698