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

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

Issue 908493004: Landing Recent QUIC Changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix valgrind error 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_stream_sequencer_test.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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 DCHECK(packet.packet != nullptr);
57 info.is_fec_packet = packet.packet->is_fec_packet(); 57 info.is_fec_packet = packet.is_fec_packet;
58 58
59 if (old_sequence_number == 0) { 59 if (old_sequence_number == 0) {
60 if (packet.retransmittable_frames != nullptr && 60 if (packet.retransmittable_frames != nullptr &&
61 packet.retransmittable_frames->HasCryptoHandshake() == IS_HANDSHAKE) { 61 packet.retransmittable_frames->HasCryptoHandshake() == IS_HANDSHAKE) {
62 ++pending_crypto_packet_count_; 62 ++pending_crypto_packet_count_;
63 } 63 }
64 } else { 64 } else {
65 TransferRetransmissionInfo( 65 TransferRetransmissionInfo(
66 old_sequence_number, sequence_number, transmission_type, &info); 66 old_sequence_number, sequence_number, transmission_type, &info);
67 } 67 }
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 TransmissionInfo* info = &unacked_packets_[sequence_number - least_unacked_]; 401 TransmissionInfo* info = &unacked_packets_[sequence_number - least_unacked_];
402 DCHECK(!info->in_flight); 402 DCHECK(!info->in_flight);
403 DCHECK_NE(0u, info->bytes_sent); 403 DCHECK_NE(0u, info->bytes_sent);
404 DCHECK(info->sent_time.IsInitialized()); 404 DCHECK(info->sent_time.IsInitialized());
405 405
406 bytes_in_flight_ += info->bytes_sent; 406 bytes_in_flight_ += info->bytes_sent;
407 info->in_flight = true; 407 info->in_flight = true;
408 } 408 }
409 409
410 } // namespace net 410 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_stream_sequencer_test.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