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

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

Issue 352403002: Repair the CWND reduction caused by spurious RTO's in QUIC's congestion (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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_unacked_packet_map.h ('k') | net/quic/test_tools/quic_test_utils.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 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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 313
314 largest_sent_packet_ = max(sequence_number, largest_sent_packet_); 314 largest_sent_packet_ = max(sequence_number, largest_sent_packet_);
315 it->second.sent_time = sent_time; 315 it->second.sent_time = sent_time;
316 if (set_in_flight) { 316 if (set_in_flight) {
317 bytes_in_flight_ += bytes_sent; 317 bytes_in_flight_ += bytes_sent;
318 it->second.bytes_sent = bytes_sent; 318 it->second.bytes_sent = bytes_sent;
319 it->second.in_flight = true; 319 it->second.in_flight = true;
320 } 320 }
321 } 321 }
322 322
323 void QuicUnackedPacketMap::RestoreInFlight(
324 QuicPacketSequenceNumber sequence_number) {
325 DCHECK_LT(0u, sequence_number);
326 UnackedPacketMap::iterator it = unacked_packets_.find(sequence_number);
327 if (it == unacked_packets_.end()) {
328 LOG(DFATAL) << "OnPacketSent called for packet that is not unacked: "
329 << sequence_number;
330 return;
331 }
332 DCHECK(!it->second.in_flight);
333 DCHECK_NE(0u, it->second.bytes_sent);
334 DCHECK(it->second.sent_time.IsInitialized());
335
336 bytes_in_flight_ += it->second.bytes_sent;
337 it->second.in_flight = true;
338 }
339
323 } // namespace net 340 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_unacked_packet_map.h ('k') | net/quic/test_tools/quic_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698