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

Unified Diff: net/quic/core/crypto/crypto_framer.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_framer.h ('k') | net/quic/core/crypto/crypto_framer_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/crypto/crypto_framer.cc
diff --git a/net/quic/core/crypto/crypto_framer.cc b/net/quic/core/crypto/crypto_framer.cc
index 56d9bf8dba2ad6953451397ac8cae377653e2870..84a9c8910bed5b9539f1cc3953b2be18d2db77c7 100644
--- a/net/quic/core/crypto/crypto_framer.cc
+++ b/net/quic/core/crypto/crypto_framer.cc
@@ -9,8 +9,7 @@
#include "net/quic/core/quic_data_writer.h"
#include "net/quic/core/quic_packets.h"
#include "net/quic/platform/api/quic_str_cat.h"
-
-using base::StringPiece;
+#include "net/quic/platform/api/quic_string_piece.h"
namespace net {
@@ -51,7 +50,7 @@ CryptoFramer::~CryptoFramer() {}
// static
std::unique_ptr<CryptoHandshakeMessage> CryptoFramer::ParseMessage(
- StringPiece in) {
+ QuicStringPiece in) {
OneShotVisitor visitor;
CryptoFramer framer;
@@ -64,7 +63,7 @@ std::unique_ptr<CryptoHandshakeMessage> CryptoFramer::ParseMessage(
return visitor.release();
}
-bool CryptoFramer::ProcessInput(StringPiece input) {
+bool CryptoFramer::ProcessInput(QuicStringPiece input) {
DCHECK_EQ(QUIC_NO_ERROR, error_);
if (error_ != QUIC_NO_ERROR) {
return false;
@@ -191,7 +190,7 @@ void CryptoFramer::Clear() {
state_ = STATE_READING_TAG;
}
-QuicErrorCode CryptoFramer::Process(StringPiece input) {
+QuicErrorCode CryptoFramer::Process(QuicStringPiece input) {
// Add this data to the buffer.
buffer_.append(input.data(), input.length());
QuicDataReader reader(buffer_.data(), buffer_.length());
@@ -259,7 +258,7 @@ QuicErrorCode CryptoFramer::Process(StringPiece input) {
break;
}
for (const std::pair<QuicTag, size_t>& item : tags_and_lengths_) {
- StringPiece value;
+ QuicStringPiece value;
reader.ReadStringPiece(&value, item.second);
message_.SetStringPiece(item.first, value);
}
« no previous file with comments | « net/quic/core/crypto/crypto_framer.h ('k') | net/quic/core/crypto/crypto_framer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698