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

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

Issue 754433003: Update from https://crrev.com/305340 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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.h ('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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 DCHECK_GE(sequence_number, least_unacked_ + unacked_packets_.size()); 46 DCHECK_GE(sequence_number, least_unacked_ + unacked_packets_.size());
47 while (least_unacked_ + unacked_packets_.size() < sequence_number) { 47 while (least_unacked_ + unacked_packets_.size() < sequence_number) {
48 unacked_packets_.push_back(TransmissionInfo()); 48 unacked_packets_.push_back(TransmissionInfo());
49 unacked_packets_.back().is_unackable = true; 49 unacked_packets_.back().is_unackable = true;
50 } 50 }
51 51
52 TransmissionInfo info(packet.retransmittable_frames, 52 TransmissionInfo info(packet.retransmittable_frames,
53 packet.sequence_number_length, 53 packet.sequence_number_length,
54 transmission_type, 54 transmission_type,
55 sent_time); 55 sent_time);
56 DCHECK(packet.packet != nullptr);
57 info.is_fec_packet = packet.packet->is_fec_packet();
58
56 if (old_sequence_number == 0) { 59 if (old_sequence_number == 0) {
57 if (packet.retransmittable_frames != nullptr && 60 if (packet.retransmittable_frames != nullptr &&
58 packet.retransmittable_frames->HasCryptoHandshake() == IS_HANDSHAKE) { 61 packet.retransmittable_frames->HasCryptoHandshake() == IS_HANDSHAKE) {
59 ++pending_crypto_packet_count_; 62 ++pending_crypto_packet_count_;
60 } 63 }
61 } else { 64 } else {
62 TransferRetransmissionInfo( 65 TransferRetransmissionInfo(
63 old_sequence_number, sequence_number, transmission_type, &info); 66 old_sequence_number, sequence_number, transmission_type, &info);
64 } 67 }
65 68
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 TransmissionInfo* info = &unacked_packets_[sequence_number - least_unacked_]; 377 TransmissionInfo* info = &unacked_packets_[sequence_number - least_unacked_];
375 DCHECK(!info->in_flight); 378 DCHECK(!info->in_flight);
376 DCHECK_NE(0u, info->bytes_sent); 379 DCHECK_NE(0u, info->bytes_sent);
377 DCHECK(info->sent_time.IsInitialized()); 380 DCHECK(info->sent_time.IsInitialized());
378 381
379 bytes_in_flight_ += info->bytes_sent; 382 bytes_in_flight_ += info->bytes_sent;
380 info->in_flight = true; 383 info->in_flight = true;
381 } 384 }
382 385
383 } // namespace net 386 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_time.h ('k') | net/quic/quic_unacked_packet_map_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698