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

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

Issue 2340583002: Make DiversificationNonce a std::array (Closed)
Patch Set: Created 4 years, 3 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_protocol.h ('k') | no next file » | 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_protocol.h" 5 #include "net/quic/core/quic_protocol.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_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"
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 << ", version_flag: " << header.public_header.version_flag; 304 << ", version_flag: " << header.public_header.version_flag;
305 if (header.public_header.version_flag) { 305 if (header.public_header.version_flag) {
306 os << ", version:"; 306 os << ", version:";
307 for (size_t i = 0; i < header.public_header.versions.size(); ++i) { 307 for (size_t i = 0; i < header.public_header.versions.size(); ++i) {
308 os << " "; 308 os << " ";
309 os << QuicVersionToString(header.public_header.versions[i]); 309 os << QuicVersionToString(header.public_header.versions[i]);
310 } 310 }
311 } 311 }
312 if (header.public_header.nonce != nullptr) { 312 if (header.public_header.nonce != nullptr) {
313 os << ", diversification_nonce: " 313 os << ", diversification_nonce: "
314 << net::QuicUtils::HexDecode(*header.public_header.nonce); 314 << QuicUtils::HexEncode(StringPiece(header.public_header.nonce->data(),
315 header.public_header.nonce->size()));
315 } 316 }
316 os << ", fec_flag: " << header.fec_flag 317 os << ", fec_flag: " << header.fec_flag
317 << ", entropy_flag: " << header.entropy_flag 318 << ", entropy_flag: " << header.entropy_flag
318 << ", entropy hash: " << static_cast<int>(header.entropy_hash) 319 << ", entropy hash: " << static_cast<int>(header.entropy_hash)
319 << ", path_id: " << static_cast<int>(header.path_id) 320 << ", path_id: " << static_cast<int>(header.path_id)
320 << ", packet_number: " << header.packet_number << " }\n"; 321 << ", packet_number: " << header.packet_number << " }\n";
321 return os; 322 return os;
322 } 323 }
323 324
324 bool IsAwaitingPacket(const QuicAckFrame& ack_frame, 325 bool IsAwaitingPacket(const QuicAckFrame& ack_frame,
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 is_unackable(false), 875 is_unackable(false),
875 has_crypto_handshake(has_crypto_handshake), 876 has_crypto_handshake(has_crypto_handshake),
876 num_padding_bytes(num_padding_bytes), 877 num_padding_bytes(num_padding_bytes),
877 retransmission(0) {} 878 retransmission(0) {}
878 879
879 TransmissionInfo::TransmissionInfo(const TransmissionInfo& other) = default; 880 TransmissionInfo::TransmissionInfo(const TransmissionInfo& other) = default;
880 881
881 TransmissionInfo::~TransmissionInfo() {} 882 TransmissionInfo::~TransmissionInfo() {}
882 883
883 } // namespace net 884 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_protocol.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698