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

Unified Diff: net/quic/core/crypto/null_encrypter.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/null_encrypter.h ('k') | net/quic/core/crypto/null_encrypter_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/crypto/null_encrypter.cc
diff --git a/net/quic/core/crypto/null_encrypter.cc b/net/quic/core/crypto/null_encrypter.cc
index a7cb5d1794d3205e35ab9b4a05bc2d94e5b301aa..1aaf1522b6883c6a303d8f3efff12a87b7ccdd50 100644
--- a/net/quic/core/crypto/null_encrypter.cc
+++ b/net/quic/core/crypto/null_encrypter.cc
@@ -7,7 +7,6 @@
#include "net/quic/core/quic_data_writer.h"
#include "net/quic/core/quic_utils.h"
-using base::StringPiece;
using std::string;
namespace net {
@@ -17,18 +16,18 @@ const size_t kHashSizeShort = 12; // size of uint128 serialized short
NullEncrypter::NullEncrypter(Perspective perspective)
: perspective_(perspective) {}
-bool NullEncrypter::SetKey(StringPiece key) {
+bool NullEncrypter::SetKey(QuicStringPiece key) {
return key.empty();
}
-bool NullEncrypter::SetNoncePrefix(StringPiece nonce_prefix) {
+bool NullEncrypter::SetNoncePrefix(QuicStringPiece nonce_prefix) {
return nonce_prefix.empty();
}
bool NullEncrypter::EncryptPacket(QuicVersion version,
QuicPacketNumber /*packet_number*/,
- StringPiece associated_data,
- StringPiece plaintext,
+ QuicStringPiece associated_data,
+ QuicStringPiece plaintext,
char* output,
size_t* output_length,
size_t max_output_length) {
@@ -73,12 +72,12 @@ size_t NullEncrypter::GetCiphertextSize(size_t plaintext_size) const {
return plaintext_size + GetHashLength();
}
-StringPiece NullEncrypter::GetKey() const {
- return StringPiece();
+QuicStringPiece NullEncrypter::GetKey() const {
+ return QuicStringPiece();
}
-StringPiece NullEncrypter::GetNoncePrefix() const {
- return StringPiece();
+QuicStringPiece NullEncrypter::GetNoncePrefix() const {
+ return QuicStringPiece();
}
size_t NullEncrypter::GetHashLength() const {
« no previous file with comments | « net/quic/core/crypto/null_encrypter.h ('k') | net/quic/core/crypto/null_encrypter_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698