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

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

Issue 491663003: Remove largest_observed_ from QuicSentPacketManager, since it's also in (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Optimize_EntropyTracker_73709652
Patch Set: Created 6 years, 4 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_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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 == IS_HANDSHAKE) { 177 == IS_HANDSHAKE) {
178 --pending_crypto_packet_count_; 178 --pending_crypto_packet_count_;
179 } 179 }
180 delete transmission_info->retransmittable_frames; 180 delete transmission_info->retransmittable_frames;
181 transmission_info->retransmittable_frames = NULL; 181 transmission_info->retransmittable_frames = NULL;
182 } 182 }
183 } 183 }
184 184
185 void QuicUnackedPacketMap::IncreaseLargestObserved( 185 void QuicUnackedPacketMap::IncreaseLargestObserved(
186 QuicPacketSequenceNumber largest_observed) { 186 QuicPacketSequenceNumber largest_observed) {
187 DCHECK_LT(largest_observed_, largest_observed); 187 DCHECK_LE(largest_observed_, largest_observed);
188 largest_observed_ = largest_observed; 188 largest_observed_ = largest_observed;
189 UnackedPacketMap::iterator it = unacked_packets_.begin(); 189 UnackedPacketMap::iterator it = unacked_packets_.begin();
190 while (it != unacked_packets_.end() && it->first <= largest_observed_) { 190 while (it != unacked_packets_.end() && it->first <= largest_observed_) {
191 if (!IsPacketUseless(it)) { 191 if (!IsPacketUseless(it)) {
192 ++it; 192 ++it;
193 continue; 193 continue;
194 } 194 }
195 delete it->second.all_transmissions; 195 delete it->second.all_transmissions;
196 QuicPacketSequenceNumber sequence_number = it->first; 196 QuicPacketSequenceNumber sequence_number = it->first;
197 ++it; 197 ++it;
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 } 345 }
346 DCHECK(!it->second.in_flight); 346 DCHECK(!it->second.in_flight);
347 DCHECK_NE(0u, it->second.bytes_sent); 347 DCHECK_NE(0u, it->second.bytes_sent);
348 DCHECK(it->second.sent_time.IsInitialized()); 348 DCHECK(it->second.sent_time.IsInitialized());
349 349
350 bytes_in_flight_ += it->second.bytes_sent; 350 bytes_in_flight_ += it->second.bytes_sent;
351 it->second.in_flight = true; 351 it->second.in_flight = true;
352 } 352 }
353 353
354 } // namespace net 354 } // 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