OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/core/quic_protocol.h" | 5 #include "net/quic/core/quic_protocol.h" |
6 | 6 |
7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
9 #include "net/quic/core/quic_flags.h" | 9 #include "net/quic/core/quic_flags.h" |
10 #include "net/quic/core/quic_utils.h" | 10 #include "net/quic/core/quic_utils.h" |
11 #include "net/quic/core/quic_versions.h" | 11 #include "net/quic/core/quic_versions.h" |
12 | 12 |
13 using base::StringPiece; | 13 using base::StringPiece; |
14 using std::map; | 14 using std::map; |
15 using std::numeric_limits; | 15 using std::numeric_limits; |
16 using std::ostream; | 16 using std::ostream; |
17 using std::string; | 17 using std::string; |
18 | 18 |
19 namespace net { | 19 namespace net { |
20 | 20 |
21 const char* const kFinalOffsetHeaderKey = ":final-offset"; | |
22 | |
23 size_t GetPacketHeaderSize(QuicVersion version, | 21 size_t GetPacketHeaderSize(QuicVersion version, |
24 const QuicPacketHeader& header) { | 22 const QuicPacketHeader& header) { |
25 return GetPacketHeaderSize(version, header.public_header.connection_id_length, | 23 return GetPacketHeaderSize(version, header.public_header.connection_id_length, |
26 header.public_header.version_flag, | 24 header.public_header.version_flag, |
27 header.public_header.multipath_flag, | 25 header.public_header.multipath_flag, |
28 header.public_header.nonce != nullptr, | 26 header.public_header.nonce != nullptr, |
29 header.public_header.packet_number_length); | 27 header.public_header.packet_number_length); |
30 } | 28 } |
31 | 29 |
32 size_t GetPacketHeaderSize(QuicVersion version, | 30 size_t GetPacketHeaderSize(QuicVersion version, |
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
741 is_unackable(false), | 739 is_unackable(false), |
742 has_crypto_handshake(has_crypto_handshake), | 740 has_crypto_handshake(has_crypto_handshake), |
743 num_padding_bytes(num_padding_bytes), | 741 num_padding_bytes(num_padding_bytes), |
744 retransmission(0) {} | 742 retransmission(0) {} |
745 | 743 |
746 TransmissionInfo::TransmissionInfo(const TransmissionInfo& other) = default; | 744 TransmissionInfo::TransmissionInfo(const TransmissionInfo& other) = default; |
747 | 745 |
748 TransmissionInfo::~TransmissionInfo() {} | 746 TransmissionInfo::~TransmissionInfo() {} |
749 | 747 |
750 } // namespace net | 748 } // namespace net |
OLD | NEW |