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

Unified Diff: net/quic/core/crypto/quic_encrypter.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/quic_decrypter.cc ('k') | net/quic/core/crypto/strike_register_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/crypto/quic_encrypter.h
diff --git a/net/quic/core/crypto/quic_encrypter.h b/net/quic/core/crypto/quic_encrypter.h
index 40d079ce4a1d2a5def7e778ab1819f62fb0058a8..03aa6df076697ce50301ac0f5c97365b1620156a 100644
--- a/net/quic/core/crypto/quic_encrypter.h
+++ b/net/quic/core/crypto/quic_encrypter.h
@@ -9,6 +9,7 @@
#include "net/quic/core/quic_packets.h"
#include "net/quic/platform/api/quic_export.h"
+#include "net/quic/platform/api/quic_string_piece.h"
namespace net {
@@ -22,7 +23,7 @@ class QUIC_EXPORT_PRIVATE QuicEncrypter {
//
// NOTE: The key is the client_write_key or server_write_key derived from
// the master secret.
- virtual bool SetKey(base::StringPiece key) = 0;
+ virtual bool SetKey(QuicStringPiece key) = 0;
// Sets the fixed initial bytes of the nonce. Returns true on success,
// false on failure.
@@ -39,7 +40,7 @@ class QUIC_EXPORT_PRIVATE QuicEncrypter {
//
// The security of the nonce format requires that QUIC never reuse a
// packet number, even when retransmitting a lost packet.
- virtual bool SetNoncePrefix(base::StringPiece nonce_prefix) = 0;
+ virtual bool SetNoncePrefix(QuicStringPiece nonce_prefix) = 0;
// Writes encrypted |plaintext| and a MAC over |plaintext| and
// |associated_data| into output. Sets |output_length| to the number of
@@ -50,8 +51,8 @@ class QUIC_EXPORT_PRIVATE QuicEncrypter {
// |plaintext| must be <= |output|.
virtual bool EncryptPacket(QuicVersion version,
QuicPacketNumber packet_number,
- base::StringPiece associated_data,
- base::StringPiece plaintext,
+ QuicStringPiece associated_data,
+ QuicStringPiece plaintext,
char* output,
size_t* output_length,
size_t max_output_length) = 0;
@@ -76,8 +77,8 @@ class QUIC_EXPORT_PRIVATE QuicEncrypter {
virtual size_t GetCiphertextSize(size_t plaintext_size) const = 0;
// For use by unit tests only.
- virtual base::StringPiece GetKey() const = 0;
- virtual base::StringPiece GetNoncePrefix() const = 0;
+ virtual QuicStringPiece GetKey() const = 0;
+ virtual QuicStringPiece GetNoncePrefix() const = 0;
};
} // namespace net
« no previous file with comments | « net/quic/core/crypto/quic_decrypter.cc ('k') | net/quic/core/crypto/strike_register_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698