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

Unified Diff: net/quic/core/crypto/crypto_secret_boxer.h

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.cc ('k') | net/quic/core/crypto/crypto_secret_boxer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/crypto/crypto_secret_boxer.h
diff --git a/net/quic/core/crypto/crypto_secret_boxer.h b/net/quic/core/crypto/crypto_secret_boxer.h
index 93e6f90fc127dbda8858201b2c9aad5826d82907..d9558140e834b5c3a59cd352d4f68313c0112041 100644
--- a/net/quic/core/crypto/crypto_secret_boxer.h
+++ b/net/quic/core/crypto/crypto_secret_boxer.h
@@ -10,9 +10,9 @@
#include <vector>
#include "base/macros.h"
-#include "base/strings/string_piece.h"
#include "net/quic/platform/api/quic_export.h"
#include "net/quic/platform/api/quic_mutex.h"
+#include "net/quic/platform/api/quic_string_piece.h"
namespace net {
@@ -39,16 +39,16 @@ class QUIC_EXPORT_PRIVATE CryptoSecretBoxer {
// returns the resulting ciphertext. Since an authenticator and nonce are
// included, the result will be slightly larger than |plaintext|. The first
// key in the vector supplied to |SetKeys| will be used.
- std::string Box(QuicRandom* rand, base::StringPiece plaintext) const;
+ std::string Box(QuicRandom* rand, QuicStringPiece plaintext) const;
// Unbox takes the result of a previous call to |Box| in |ciphertext| and
// authenticates+decrypts it. If |ciphertext| cannot be decrypted with any of
// the supplied keys, the function returns false. Otherwise, |out_storage| is
// used to store the result and |out| is set to point into |out_storage| and
// contains the original plaintext.
- bool Unbox(base::StringPiece ciphertext,
+ bool Unbox(QuicStringPiece ciphertext,
std::string* out_storage,
- base::StringPiece* out) const;
+ QuicStringPiece* out) const;
private:
mutable QuicMutex lock_;
« no previous file with comments | « net/quic/core/crypto/crypto_handshake_message.cc ('k') | net/quic/core/crypto/crypto_secret_boxer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698