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

Side by Side Diff: net/quic/core/quic_packets.cc

Issue 2901773004: Landing Recent QUIC changes until May 20, 2017. (Closed)
Patch Set: Disable quic_restart_flag_quic_big_endian_connection_id_server until tests can be fixed. Created 3 years, 6 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/core/quic_packets.h ('k') | net/quic/core/quic_types.h » ('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 (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_utils.h" 7 #include "net/quic/core/quic_utils.h"
8 #include "net/quic/core/quic_versions.h" 8 #include "net/quic/core/quic_versions.h"
9 #include "net/quic/platform/api/quic_flags.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"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 QuicPacketNumberLength packet_number_length) { 45 QuicPacketNumberLength packet_number_length) {
46 // Encryption starts before private flags. 46 // Encryption starts before private flags.
47 return GetPacketHeaderSize(version, connection_id_length, include_version, 47 return GetPacketHeaderSize(version, connection_id_length, include_version,
48 include_diversification_nonce, 48 include_diversification_nonce,
49 packet_number_length); 49 packet_number_length);
50 } 50 }
51 51
52 QuicPacketPublicHeader::QuicPacketPublicHeader() 52 QuicPacketPublicHeader::QuicPacketPublicHeader()
53 : connection_id(0), 53 : connection_id(0),
54 connection_id_length(PACKET_8BYTE_CONNECTION_ID), 54 connection_id_length(PACKET_8BYTE_CONNECTION_ID),
55 multipath_flag(false),
56 reset_flag(false), 55 reset_flag(false),
57 version_flag(false), 56 version_flag(false),
58 packet_number_length(PACKET_6BYTE_PACKET_NUMBER), 57 packet_number_length(PACKET_6BYTE_PACKET_NUMBER),
59 nonce(nullptr) {} 58 nonce(nullptr) {}
60 59
61 QuicPacketPublicHeader::QuicPacketPublicHeader( 60 QuicPacketPublicHeader::QuicPacketPublicHeader(
62 const QuicPacketPublicHeader& other) = default; 61 const QuicPacketPublicHeader& other) = default;
63 62
64 QuicPacketPublicHeader::~QuicPacketPublicHeader() {} 63 QuicPacketPublicHeader::~QuicPacketPublicHeader() {}
65 64
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 serialized_packet->largest_acked = 0; 227 serialized_packet->largest_acked = 0;
229 } 228 }
230 229
231 char* CopyBuffer(const SerializedPacket& packet) { 230 char* CopyBuffer(const SerializedPacket& packet) {
232 char* dst_buffer = new char[packet.encrypted_length]; 231 char* dst_buffer = new char[packet.encrypted_length];
233 memcpy(dst_buffer, packet.encrypted_buffer, packet.encrypted_length); 232 memcpy(dst_buffer, packet.encrypted_buffer, packet.encrypted_length);
234 return dst_buffer; 233 return dst_buffer;
235 } 234 }
236 235
237 } // namespace net 236 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_packets.h ('k') | net/quic/core/quic_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698