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

Unified Diff: net/quic/core/crypto/aes_128_gcm_12_encrypter_test.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/aes_128_gcm_12_decrypter_test.cc ('k') | net/quic/core/crypto/cert_compressor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/crypto/aes_128_gcm_12_encrypter_test.cc
diff --git a/net/quic/core/crypto/aes_128_gcm_12_encrypter_test.cc b/net/quic/core/crypto/aes_128_gcm_12_encrypter_test.cc
index 9236329b8a83cc8b3cbd0d25bf9da33b70a5a74a..352c18c3cf6c473c29e6e5fed455a7445c5ff886 100644
--- a/net/quic/core/crypto/aes_128_gcm_12_encrypter_test.cc
+++ b/net/quic/core/crypto/aes_128_gcm_12_encrypter_test.cc
@@ -10,7 +10,6 @@
#include "net/quic/platform/api/quic_text_utils.h"
#include "net/quic/test_tools/quic_test_utils.h"
-using base::StringPiece;
using std::string;
namespace {
@@ -158,9 +157,9 @@ namespace test {
// EncryptWithNonce wraps the |Encrypt| method of |encrypter| to allow passing
// in an nonce and also to allocate the buffer needed for the ciphertext.
QuicData* EncryptWithNonce(Aes128Gcm12Encrypter* encrypter,
- StringPiece nonce,
- StringPiece associated_data,
- StringPiece plaintext) {
+ QuicStringPiece nonce,
+ QuicStringPiece associated_data,
+ QuicStringPiece plaintext) {
size_t ciphertext_size = encrypter->GetCiphertextSize(plaintext.length());
std::unique_ptr<char[]> ciphertext(new char[ciphertext_size]);
@@ -202,7 +201,7 @@ TEST(Aes128Gcm12EncrypterTest, Encrypt) {
// This deliberately tests that the encrypter can handle an AAD that
// is set to nullptr, as opposed to a zero-length, non-nullptr
// pointer.
- aad.length() ? aad : StringPiece(), pt));
+ aad.length() ? aad : QuicStringPiece(), pt));
ASSERT_TRUE(encrypted.get());
// The test vectors have 16 byte authenticators but this code only uses
« no previous file with comments | « net/quic/core/crypto/aes_128_gcm_12_decrypter_test.cc ('k') | net/quic/core/crypto/cert_compressor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698