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

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

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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_time_wait_list_manager.cc ('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); 56 info.is_fec_packet = packet.is_fec_packet;
57 info.is_fec_packet = packet.packet->is_fec_packet();
58 57
59 if (old_sequence_number == 0) { 58 if (old_sequence_number == 0) {
60 if (packet.retransmittable_frames != nullptr && 59 if (packet.retransmittable_frames != nullptr &&
61 packet.retransmittable_frames->HasCryptoHandshake() == IS_HANDSHAKE) { 60 packet.retransmittable_frames->HasCryptoHandshake() == IS_HANDSHAKE) {
62 ++pending_crypto_packet_count_; 61 ++pending_crypto_packet_count_;
63 } 62 }
64 } else { 63 } else {
65 TransferRetransmissionInfo( 64 TransferRetransmissionInfo(
66 old_sequence_number, sequence_number, transmission_type, &info); 65 old_sequence_number, sequence_number, transmission_type, &info);
67 } 66 }
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 TransmissionInfo* info = &unacked_packets_[sequence_number - least_unacked_]; 400 TransmissionInfo* info = &unacked_packets_[sequence_number - least_unacked_];
402 DCHECK(!info->in_flight); 401 DCHECK(!info->in_flight);
403 DCHECK_NE(0u, info->bytes_sent); 402 DCHECK_NE(0u, info->bytes_sent);
404 DCHECK(info->sent_time.IsInitialized()); 403 DCHECK(info->sent_time.IsInitialized());
405 404
406 bytes_in_flight_ += info->bytes_sent; 405 bytes_in_flight_ += info->bytes_sent;
407 info->in_flight = true; 406 info->in_flight = true;
408 } 407 }
409 408
410 } // namespace net 409 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_time_wait_list_manager.cc ('k') | net/quic/quic_unacked_packet_map_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698