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

Unified Diff: components/webcrypto/algorithms/aes_ctr_unittest.cc

Issue 1461703009: Switch //components from vector_as_array to vector::data. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: eroman comment Created 5 years, 1 month 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 | « components/webcrypto/algorithms/aes_ctr.cc ('k') | components/webcrypto/algorithms/aes_gcm_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/webcrypto/algorithms/aes_ctr_unittest.cc
diff --git a/components/webcrypto/algorithms/aes_ctr_unittest.cc b/components/webcrypto/algorithms/aes_ctr_unittest.cc
index 9bdbf38dcdbaf0a252ad7e9e9af68ab868b2db95..9668ca5b8ab7041ef5f6c7ef985cabcbed66fd62 100644
--- a/components/webcrypto/algorithms/aes_ctr_unittest.cc
+++ b/components/webcrypto/algorithms/aes_ctr_unittest.cc
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/stl_util.h"
#include "base/values.h"
#include "components/webcrypto/algorithm_dispatch.h"
#include "components/webcrypto/algorithms/test_helpers.h"
@@ -22,7 +21,7 @@ blink::WebCryptoAlgorithm CreateAesCtrAlgorithm(
return blink::WebCryptoAlgorithm::adoptParamsAndCreate(
blink::WebCryptoAlgorithmIdAesCtr,
new blink::WebCryptoAesCtrParams(
- length_bits, vector_as_array(&counter),
+ length_bits, counter.data(),
static_cast<unsigned int>(counter.size())));
}
@@ -140,8 +139,8 @@ TEST_F(WebCryptoAesCtrTest, OverflowAndRepeatCounter) {
// 16 and 17 AES blocks worth of data respectively (AES blocks are 16 bytes
// long).
- CryptoData input_16(vector_as_array(&buffer), 256);
- CryptoData input_17(vector_as_array(&buffer), 272);
+ CryptoData input_16(buffer.data(), 256);
+ CryptoData input_17(buffer.data(), 272);
std::vector<uint8_t> output;
« no previous file with comments | « components/webcrypto/algorithms/aes_ctr.cc ('k') | components/webcrypto/algorithms/aes_gcm_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698