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_packets.h" | 5 #include "net/quic/core/quic_packets.h" |
6 | 6 |
7 #include "net/quic/core/quic_flags.h" | |
8 #include "net/quic/core/quic_utils.h" | 7 #include "net/quic/core/quic_utils.h" |
9 #include "net/quic/core/quic_versions.h" | 8 #include "net/quic/core/quic_versions.h" |
| 9 #include "net/quic/platform/api/quic_flags.h" |
10 #include "net/quic/platform/api/quic_ptr_util.h" | 10 #include "net/quic/platform/api/quic_ptr_util.h" |
11 #include "net/quic/platform/api/quic_str_cat.h" | 11 #include "net/quic/platform/api/quic_str_cat.h" |
12 #include "net/quic/platform/api/quic_text_utils.h" | 12 #include "net/quic/platform/api/quic_text_utils.h" |
13 | 13 |
14 using std::string; | 14 using std::string; |
15 | 15 |
16 namespace net { | 16 namespace net { |
17 | 17 |
18 size_t GetPacketHeaderSize(QuicVersion version, | 18 size_t GetPacketHeaderSize(QuicVersion version, |
19 const QuicPacketHeader& header) { | 19 const QuicPacketHeader& header) { |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 serialized_packet->largest_acked = 0; | 229 serialized_packet->largest_acked = 0; |
230 } | 230 } |
231 | 231 |
232 char* CopyBuffer(const SerializedPacket& packet) { | 232 char* CopyBuffer(const SerializedPacket& packet) { |
233 char* dst_buffer = new char[packet.encrypted_length]; | 233 char* dst_buffer = new char[packet.encrypted_length]; |
234 memcpy(dst_buffer, packet.encrypted_buffer, packet.encrypted_length); | 234 memcpy(dst_buffer, packet.encrypted_buffer, packet.encrypted_length); |
235 return dst_buffer; | 235 return dst_buffer; |
236 } | 236 } |
237 | 237 |
238 } // namespace net | 238 } // namespace net |
OLD | NEW |