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

Side by Side Diff: net/quic/crypto/crypto_handshake_message.cc

Issue 862133002: Update from https://crrev.com/312398 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/crypto/crypto_handshake_message.h" 5 #include "net/quic/crypto/crypto_handshake_message.h"
6 6
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "net/quic/crypto/crypto_framer.h" 9 #include "net/quic/crypto/crypto_framer.h"
10 #include "net/quic/crypto/crypto_protocol.h" 10 #include "net/quic/crypto/crypto_protocol.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 return *serialized_.get(); 58 return *serialized_.get();
59 } 59 }
60 60
61 void CryptoHandshakeMessage::MarkDirty() { 61 void CryptoHandshakeMessage::MarkDirty() {
62 serialized_.reset(); 62 serialized_.reset();
63 } 63 }
64 64
65 void CryptoHandshakeMessage::SetTaglist(QuicTag tag, ...) { 65 void CryptoHandshakeMessage::SetTaglist(QuicTag tag, ...) {
66 // Warning, if sizeof(QuicTag) > sizeof(int) then this function will break 66 // Warning, if sizeof(QuicTag) > sizeof(int) then this function will break
67 // because the terminating 0 will only be promoted to int. 67 // because the terminating 0 will only be promoted to int.
68 COMPILE_ASSERT(sizeof(QuicTag) <= sizeof(int), 68 static_assert(sizeof(QuicTag) <= sizeof(int),
69 crypto_tag_may_not_be_larger_than_int_or_varargs_will_break); 69 "crypto tag may not be larger than int or varargs will break");
70 70
71 vector<QuicTag> tags; 71 vector<QuicTag> tags;
72 va_list ap; 72 va_list ap;
73 73
74 va_start(ap, tag); 74 va_start(ap, tag);
75 for (;;) { 75 for (;;) {
76 QuicTag list_item = va_arg(ap, QuicTag); 76 QuicTag list_item = va_arg(ap, QuicTag);
77 if (list_item == 0) { 77 if (list_item == 0) {
78 break; 78 break;
79 } 79 }
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 ret += "0x" + base::HexEncode(it->second.data(), it->second.size()); 313 ret += "0x" + base::HexEncode(it->second.data(), it->second.size());
314 } 314 }
315 ret += "\n"; 315 ret += "\n";
316 } 316 }
317 --indent; 317 --indent;
318 ret += string(2 * indent, ' ') + ">"; 318 ret += string(2 * indent, ' ') + ">";
319 return ret; 319 return ret;
320 } 320 }
321 321
322 } // namespace net 322 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698