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

Unified Diff: net/quic/core/quic_crypto_stream.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/quic_crypto_stream.h ('k') | net/quic/core/quic_data_reader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_crypto_stream.cc
diff --git a/net/quic/core/quic_crypto_stream.cc b/net/quic/core/quic_crypto_stream.cc
index 645d389e9f9fc15d08553871e16e985f03b113d8..f571f825ef916ab4e127fbcb1b816005c556ff3c 100644
--- a/net/quic/core/quic_crypto_stream.cc
+++ b/net/quic/core/quic_crypto_stream.cc
@@ -6,7 +6,6 @@
#include <string>
-#include "base/strings/string_piece.h"
#include "net/quic/core/crypto/crypto_handshake.h"
#include "net/quic/core/crypto/crypto_utils.h"
#include "net/quic/core/quic_connection.h"
@@ -16,7 +15,6 @@
#include "net/quic/platform/api/quic_logging.h"
using std::string;
-using base::StringPiece;
namespace net {
@@ -64,7 +62,7 @@ void QuicCryptoStream::OnDataAvailable() {
// No more data to read.
break;
}
- StringPiece data(static_cast<char*>(iov.iov_base), iov.iov_len);
+ QuicStringPiece data(static_cast<char*>(iov.iov_base), iov.iov_len);
if (!crypto_framer_.ProcessInput(data)) {
CloseConnectionWithDetails(crypto_framer_.error(),
crypto_framer_.error_detail());
@@ -87,11 +85,12 @@ void QuicCryptoStream::SendHandshakeMessage(
session()->connection()->NeuterUnencryptedPackets();
session()->OnCryptoHandshakeMessageSent(message);
const QuicData& data = message.GetSerialized();
- WriteOrBufferData(StringPiece(data.data(), data.length()), false, nullptr);
+ WriteOrBufferData(QuicStringPiece(data.data(), data.length()), false,
+ nullptr);
}
-bool QuicCryptoStream::ExportKeyingMaterial(StringPiece label,
- StringPiece context,
+bool QuicCryptoStream::ExportKeyingMaterial(QuicStringPiece label,
+ QuicStringPiece context,
size_t result_len,
string* result) const {
if (!handshake_confirmed()) {
« no previous file with comments | « net/quic/core/quic_crypto_stream.h ('k') | net/quic/core/quic_data_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698