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

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

Issue 2355493004: Adds CryptoHandshakeMessage::HasStringPiece method. (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 | « no previous file | net/quic/core/crypto/crypto_handshake_message.cc » ('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) 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_CRYPTO_CRYPTO_HANDSHAKE_MESSAGE_H_ 5 #ifndef NET_QUIC_CRYPTO_CRYPTO_HANDSHAKE_MESSAGE_H_
6 #define NET_QUIC_CRYPTO_CRYPTO_HANDSHAKE_MESSAGE_H_ 6 #define NET_QUIC_CRYPTO_CRYPTO_HANDSHAKE_MESSAGE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 // GetTaglist finds an element with the given tag containing zero or more 76 // GetTaglist finds an element with the given tag containing zero or more
77 // tags. If such a tag doesn't exist, it returns false. Otherwise it sets 77 // tags. If such a tag doesn't exist, it returns false. Otherwise it sets
78 // |out_tags| and |out_len| to point to the array of tags and returns true. 78 // |out_tags| and |out_len| to point to the array of tags and returns true.
79 // The array points into the CryptoHandshakeMessage and is valid only for as 79 // The array points into the CryptoHandshakeMessage and is valid only for as
80 // long as the CryptoHandshakeMessage exists and is not modified. 80 // long as the CryptoHandshakeMessage exists and is not modified.
81 QuicErrorCode GetTaglist(QuicTag tag, 81 QuicErrorCode GetTaglist(QuicTag tag,
82 const QuicTag** out_tags, 82 const QuicTag** out_tags,
83 size_t* out_len) const; 83 size_t* out_len) const;
84 84
85 bool GetStringPiece(QuicTag tag, base::StringPiece* out) const; 85 bool GetStringPiece(QuicTag tag, base::StringPiece* out) const;
86 bool HasStringPiece(QuicTag tag) const;
86 87
87 // GetNthValue24 interprets the value with the given tag to be a series of 88 // 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 89 // 24-bit, length prefixed values and it returns the subvalue with the given
89 // index. 90 // index.
90 QuicErrorCode GetNthValue24(QuicTag tag, 91 QuicErrorCode GetNthValue24(QuicTag tag,
91 unsigned index, 92 unsigned index,
92 base::StringPiece* out) const; 93 base::StringPiece* out) const;
93 QuicErrorCode GetUint32(QuicTag tag, uint32_t* out) const; 94 QuicErrorCode GetUint32(QuicTag tag, uint32_t* out) const;
94 QuicErrorCode GetUint64(QuicTag tag, uint64_t* out) const; 95 QuicErrorCode GetUint64(QuicTag tag, uint64_t* out) const;
95 96
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 size_t minimum_size_; 131 size_t minimum_size_;
131 132
132 // The serialized form of the handshake message. This member is constructed 133 // The serialized form of the handshake message. This member is constructed
133 // lasily. 134 // lasily.
134 mutable std::unique_ptr<QuicData> serialized_; 135 mutable std::unique_ptr<QuicData> serialized_;
135 }; 136 };
136 137
137 } // namespace net 138 } // namespace net
138 139
139 #endif // NET_QUIC_CRYPTO_CRYPTO_HANDSHAKE_MESSAGE_H_ 140 #endif // NET_QUIC_CRYPTO_CRYPTO_HANDSHAKE_MESSAGE_H_
OLDNEW
« no previous file with comments | « no previous file | net/quic/core/crypto/crypto_handshake_message.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698