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

Side by Side Diff: net/quic/core/crypto/crypto_handshake_message.h

Issue 2907743003: Change CryptoHandshakeMessage::GetTaglist to tag a QuicTagVector* (Closed)
Patch Set: fix QuicConfig 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
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 #ifndef NET_QUIC_CORE_CRYPTO_CRYPTO_HANDSHAKE_MESSAGE_H_ 5 #ifndef NET_QUIC_CORE_CRYPTO_CRYPTO_HANDSHAKE_MESSAGE_H_
6 #define NET_QUIC_CORE_CRYPTO_CRYPTO_HANDSHAKE_MESSAGE_H_ 6 #define NET_QUIC_CORE_CRYPTO_CRYPTO_HANDSHAKE_MESSAGE_H_
7 7
8 #include <cstddef> 8 #include <cstddef>
9 #include <cstdint> 9 #include <cstdint>
10 #include <memory> 10 #include <memory>
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 const QuicTagValueMap& tag_value_map() const { return tag_value_map_; } 67 const QuicTagValueMap& tag_value_map() const { return tag_value_map_; }
68 68
69 void SetStringPiece(QuicTag tag, QuicStringPiece value); 69 void SetStringPiece(QuicTag tag, QuicStringPiece value);
70 70
71 // Erase removes a tag/value, if present, from the message. 71 // Erase removes a tag/value, if present, from the message.
72 void Erase(QuicTag tag); 72 void Erase(QuicTag tag);
73 73
74 // GetTaglist finds an element with the given tag containing zero or more 74 // GetTaglist finds an element with the given tag containing zero or more
75 // tags. If such a tag doesn't exist, it returns an error code. Otherwise it 75 // tags. If such a tag doesn't exist, it returns an error code. Otherwise it
76 // sets |out_tags| and |out_len| to point to the array of tags and returns 76 // populates |out_tags| with the tags and returns QUIC_NO_ERROR.
77 // QUIC_NO_ERROR. The array points into the CryptoHandshakeMessage and is 77 QuicErrorCode GetTaglist(QuicTag tag, QuicTagVector* out_tags) const;
78 // valid only for as long as the CryptoHandshakeMessage exists and is not
79 // modified.
80 QuicErrorCode GetTaglist(QuicTag tag,
81 const QuicTag** out_tags,
82 size_t* out_len) const;
83 78
84 bool GetStringPiece(QuicTag tag, QuicStringPiece* out) const; 79 bool GetStringPiece(QuicTag tag, QuicStringPiece* out) const;
85 bool HasStringPiece(QuicTag tag) const; 80 bool HasStringPiece(QuicTag tag) const;
86 81
87 // GetNthValue24 interprets the value with the given tag to be a series of 82 // GetNthValue24 interprets the value with the given tag to be a series of
88 // 24-bit, length prefixed values and it returns the subvalue with the given 83 // 24-bit, length prefixed values and it returns the subvalue with the given
89 // index. 84 // index.
90 QuicErrorCode GetNthValue24(QuicTag tag, 85 QuicErrorCode GetNthValue24(QuicTag tag,
91 unsigned index, 86 unsigned index,
92 QuicStringPiece* out) const; 87 QuicStringPiece* out) const;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 size_t minimum_size_; 125 size_t minimum_size_;
131 126
132 // The serialized form of the handshake message. This member is constructed 127 // The serialized form of the handshake message. This member is constructed
133 // lasily. 128 // lasily.
134 mutable std::unique_ptr<QuicData> serialized_; 129 mutable std::unique_ptr<QuicData> serialized_;
135 }; 130 };
136 131
137 } // namespace net 132 } // namespace net
138 133
139 #endif // NET_QUIC_CORE_CRYPTO_CRYPTO_HANDSHAKE_MESSAGE_H_ 134 #endif // NET_QUIC_CORE_CRYPTO_CRYPTO_HANDSHAKE_MESSAGE_H_
OLDNEW
« no previous file with comments | « no previous file | net/quic/core/crypto/crypto_handshake_message.cc » ('j') | net/quic/core/crypto/crypto_handshake_message.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698