| OLD | NEW |
| 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_bug_tracker.h" | 9 #include "net/quic/quic_bug_tracker.h" |
| 10 #include "net/quic/quic_connection_stats.h" | 10 #include "net/quic/quic_connection_stats.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 DCHECK_GE(packet_number, least_unacked_ + unacked_packets_.size()); | 42 DCHECK_GE(packet_number, least_unacked_ + unacked_packets_.size()); |
| 43 while (least_unacked_ + unacked_packets_.size() < packet_number) { | 43 while (least_unacked_ + unacked_packets_.size() < packet_number) { |
| 44 unacked_packets_.push_back(TransmissionInfo()); | 44 unacked_packets_.push_back(TransmissionInfo()); |
| 45 unacked_packets_.back().is_unackable = true; | 45 unacked_packets_.back().is_unackable = true; |
| 46 } | 46 } |
| 47 | 47 |
| 48 const bool has_crypto_handshake = | 48 const bool has_crypto_handshake = |
| 49 packet->has_crypto_handshake == IS_HANDSHAKE; | 49 packet->has_crypto_handshake == IS_HANDSHAKE; |
| 50 TransmissionInfo info(packet->encryption_level, packet->packet_number_length, | 50 TransmissionInfo info(packet->encryption_level, packet->packet_number_length, |
| 51 transmission_type, sent_time, bytes_sent, | 51 transmission_type, sent_time, bytes_sent, |
| 52 packet->is_fec_packet, has_crypto_handshake, | 52 has_crypto_handshake, packet->needs_padding); |
| 53 packet->needs_padding); | |
| 54 if (old_packet_number > 0) { | 53 if (old_packet_number > 0) { |
| 55 TransferRetransmissionInfo(old_packet_number, packet_number, | 54 TransferRetransmissionInfo(old_packet_number, packet_number, |
| 56 transmission_type, &info); | 55 transmission_type, &info); |
| 57 } | 56 } |
| 58 | 57 |
| 59 largest_sent_packet_ = packet_number; | 58 largest_sent_packet_ = packet_number; |
| 60 if (set_in_flight) { | 59 if (set_in_flight) { |
| 61 bytes_in_flight_ += bytes_sent; | 60 bytes_in_flight_ += bytes_sent; |
| 62 info.in_flight = true; | 61 info.in_flight = true; |
| 63 } | 62 } |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 } | 348 } |
| 350 } | 349 } |
| 351 return false; | 350 return false; |
| 352 } | 351 } |
| 353 | 352 |
| 354 QuicPacketNumber QuicUnackedPacketMap::GetLeastUnacked() const { | 353 QuicPacketNumber QuicUnackedPacketMap::GetLeastUnacked() const { |
| 355 return least_unacked_; | 354 return least_unacked_; |
| 356 } | 355 } |
| 357 | 356 |
| 358 } // namespace net | 357 } // namespace net |
| OLD | NEW |