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

Unified Diff: net/quic/core/crypto/crypto_handshake_message.cc

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 side-by-side diff with in-line comments
Download patch
Index: net/quic/core/crypto/crypto_handshake_message.cc
diff --git a/net/quic/core/crypto/crypto_handshake_message.cc b/net/quic/core/crypto/crypto_handshake_message.cc
index 6d09164549a4118010fedcd3f65a8a4d7e0eb3b6..9fcf6ff0d640cd1f11aa42bd875d7cc829844fa4 100644
--- a/net/quic/core/crypto/crypto_handshake_message.cc
+++ b/net/quic/core/crypto/crypto_handshake_message.cc
@@ -6,6 +6,7 @@
#include <memory>
+#include "base/stl_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "net/quic/core/crypto/crypto_framer.h"
@@ -110,6 +111,10 @@ bool CryptoHandshakeMessage::GetStringPiece(QuicTag tag,
return true;
}
+bool CryptoHandshakeMessage::HasStringPiece(QuicTag tag) const {
+ return base::ContainsKey(tag_value_map_, tag);
+}
+
QuicErrorCode CryptoHandshakeMessage::GetNthValue24(QuicTag tag,
unsigned index,
StringPiece* out) const {
« no previous file with comments | « net/quic/core/crypto/crypto_handshake_message.h ('k') | net/quic/core/crypto/crypto_handshake_message_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698