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

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

Issue 292113002: QUIC - minor clean up of comments per wtc' comments for the CL: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_packet_creator.h ('k') | net/quic/quic_session_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 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 received_info.delta_time_largest_observed; 166 received_info.delta_time_largest_observed;
167 QuicUnackedPacketMap::const_iterator it = unacked_packets_.begin(); 167 QuicUnackedPacketMap::const_iterator it = unacked_packets_.begin();
168 while (it != unacked_packets_.end()) { 168 while (it != unacked_packets_.end()) {
169 QuicPacketSequenceNumber sequence_number = it->first; 169 QuicPacketSequenceNumber sequence_number = it->first;
170 if (sequence_number > received_info.largest_observed) { 170 if (sequence_number > received_info.largest_observed) {
171 // These packets are still in flight. 171 // These packets are still in flight.
172 break; 172 break;
173 } 173 }
174 174
175 if (IsAwaitingPacket(received_info, sequence_number)) { 175 if (IsAwaitingPacket(received_info, sequence_number)) {
176 // Remove any packets not being tracked by the send algorithm, allowing 176 // Remove any rtt only packets less than or equal to the largest observed,
177 // the high water mark to be raised if necessary. 177 // since they will not produce an RTT measurement.
178 if (QuicUnackedPacketMap::IsForRttOnly(it->second)) { 178 if (QuicUnackedPacketMap::IsForRttOnly(it->second)) {
179 it = MarkPacketHandled(sequence_number, delta_largest_observed); 179 it = MarkPacketHandled(sequence_number, delta_largest_observed);
180 } else { 180 } else {
181 // Consider it multiple nacks when there is a gap between the missing 181 // Consider it multiple nacks when there is a gap between the missing
182 // packet and the largest observed, since the purpose of a nack 182 // packet and the largest observed, since the purpose of a nack
183 // threshold is to tolerate re-ordering. This handles both StretchAcks 183 // threshold is to tolerate re-ordering. This handles both StretchAcks
184 // and Forward Acks. 184 // and Forward Acks.
185 // The nack count only increases when the largest observed increases. 185 // The nack count only increases when the largest observed increases.
186 size_t min_nacks = received_info.largest_observed - sequence_number; 186 size_t min_nacks = received_info.largest_observed - sequence_number;
187 // Truncated acks can nack the largest observed, so use a min of 1. 187 // Truncated acks can nack the largest observed, so use a min of 1.
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 return; 774 return;
775 } 775 }
776 776
777 using_pacing_ = true; 777 using_pacing_ = true;
778 send_algorithm_.reset( 778 send_algorithm_.reset(
779 new PacingSender(send_algorithm_.release(), 779 new PacingSender(send_algorithm_.release(),
780 QuicTime::Delta::FromMicroseconds(1))); 780 QuicTime::Delta::FromMicroseconds(1)));
781 } 781 }
782 782
783 } // namespace net 783 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_packet_creator.h ('k') | net/quic/quic_session_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698