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

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

Issue 2740453006: Add QuicStringPiece which is actually StringPiece. (Closed)
Patch Set: fix compile error and rebase Created 3 years, 9 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
« no previous file with comments | « net/quic/core/crypto/crypto_handshake_message.h ('k') | net/quic/core/crypto/crypto_secret_boxer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 968f75564a4b374cd266032b96cdcd7c69fe21a3..bf978de1ca14f32d3dbd5975ac705021aa4e12b4 100644
--- a/net/quic/core/crypto/crypto_handshake_message.cc
+++ b/net/quic/core/crypto/crypto_handshake_message.cc
@@ -15,7 +15,6 @@
#include "net/quic/platform/api/quic_str_cat.h"
#include "net/quic/platform/api/quic_text_utils.h"
-using base::StringPiece;
using std::string;
namespace net {
@@ -68,7 +67,8 @@ void CryptoHandshakeMessage::MarkDirty() {
serialized_.reset();
}
-void CryptoHandshakeMessage::SetStringPiece(QuicTag tag, StringPiece value) {
+void CryptoHandshakeMessage::SetStringPiece(QuicTag tag,
+ QuicStringPiece value) {
tag_value_map_[tag] = value.as_string();
}
@@ -100,7 +100,7 @@ QuicErrorCode CryptoHandshakeMessage::GetTaglist(QuicTag tag,
}
bool CryptoHandshakeMessage::GetStringPiece(QuicTag tag,
- StringPiece* out) const {
+ QuicStringPiece* out) const {
QuicTagValueMap::const_iterator it = tag_value_map_.find(tag);
if (it == tag_value_map_.end()) {
return false;
@@ -113,10 +113,11 @@ bool CryptoHandshakeMessage::HasStringPiece(QuicTag tag) const {
return QuicContainsKey(tag_value_map_, tag);
}
-QuicErrorCode CryptoHandshakeMessage::GetNthValue24(QuicTag tag,
- unsigned index,
- StringPiece* out) const {
- StringPiece value;
+QuicErrorCode CryptoHandshakeMessage::GetNthValue24(
+ QuicTag tag,
+ unsigned index,
+ QuicStringPiece* out) const {
+ QuicStringPiece value;
if (!GetStringPiece(tag, &value)) {
return QUIC_CRYPTO_MESSAGE_PARAMETER_NOT_FOUND;
}
@@ -141,7 +142,7 @@ QuicErrorCode CryptoHandshakeMessage::GetNthValue24(QuicTag tag,
}
if (i == index) {
- *out = StringPiece(value.data(), size);
+ *out = QuicStringPiece(value.data(), size);
return QUIC_NO_ERROR;
}
« no previous file with comments | « net/quic/core/crypto/crypto_handshake_message.h ('k') | net/quic/core/crypto/crypto_secret_boxer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698