| Index: net/quic/core/crypto/chacha20_poly1305_decrypter_test.cc
|
| diff --git a/net/quic/core/crypto/chacha20_poly1305_decrypter_test.cc b/net/quic/core/crypto/chacha20_poly1305_decrypter_test.cc
|
| index aa766dbb21468533b3f6fd1c179a4a1235452232..a24d5315187e7769881ee5b2571f75d676204092 100644
|
| --- a/net/quic/core/crypto/chacha20_poly1305_decrypter_test.cc
|
| +++ b/net/quic/core/crypto/chacha20_poly1305_decrypter_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 {
|
| @@ -114,11 +113,12 @@ namespace test {
|
| // DecryptWithNonce wraps the |Decrypt| method of |decrypter| to allow passing
|
| // in an nonce and also to allocate the buffer needed for the plaintext.
|
| QuicData* DecryptWithNonce(ChaCha20Poly1305Decrypter* decrypter,
|
| - StringPiece nonce,
|
| - StringPiece associated_data,
|
| - StringPiece ciphertext) {
|
| + QuicStringPiece nonce,
|
| + QuicStringPiece associated_data,
|
| + QuicStringPiece ciphertext) {
|
| QuicPacketNumber packet_number;
|
| - StringPiece nonce_prefix(nonce.data(), nonce.size() - sizeof(packet_number));
|
| + QuicStringPiece nonce_prefix(nonce.data(),
|
| + nonce.size() - sizeof(packet_number));
|
| decrypter->SetNoncePrefix(nonce_prefix);
|
| memcpy(&packet_number, nonce.data() + nonce_prefix.size(),
|
| sizeof(packet_number));
|
| @@ -155,7 +155,8 @@ TEST(ChaCha20Poly1305DecrypterTest, Decrypt) {
|
| &decrypter, fixed + iv,
|
| // This deliberately tests that the decrypter can handle an AAD that
|
| // is set to nullptr, as opposed to a zero-length, non-nullptr pointer.
|
| - StringPiece(aad.length() ? aad.data() : nullptr, aad.length()), ct));
|
| + QuicStringPiece(aad.length() ? aad.data() : nullptr, aad.length()),
|
| + ct));
|
| if (!decrypted.get()) {
|
| EXPECT_FALSE(has_pt);
|
| continue;
|
|
|