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

Unified Diff: components/webcrypto/algorithms/test_helpers.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/sha_unittest.cc ('k') | components/webcrypto/algorithms/util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/webcrypto/algorithms/test_helpers.cc
diff --git a/components/webcrypto/algorithms/test_helpers.cc b/components/webcrypto/algorithms/test_helpers.cc
index bc036ac8bca5306f2cf99259ea9ed073ef688877..c715c408f6d9b1d844c80bb7851ac83694544665 100644
--- a/components/webcrypto/algorithms/test_helpers.cc
+++ b/components/webcrypto/algorithms/test_helpers.cc
@@ -12,7 +12,6 @@
#include "base/json/json_writer.h"
#include "base/logging.h"
#include "base/path_service.h"
-#include "base/stl_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/values.h"
@@ -110,10 +109,10 @@ blink::WebCryptoAlgorithm CreateRsaHashedKeyGenAlgorithm(
const std::vector<uint8_t>& public_exponent) {
DCHECK(blink::WebCryptoAlgorithm::isHash(hash_id));
return blink::WebCryptoAlgorithm::adoptParamsAndCreate(
- algorithm_id, new blink::WebCryptoRsaHashedKeyGenParams(
- CreateAlgorithm(hash_id), modulus_length,
- vector_as_array(&public_exponent),
- static_cast<unsigned int>(public_exponent.size())));
+ algorithm_id,
+ new blink::WebCryptoRsaHashedKeyGenParams(
+ CreateAlgorithm(hash_id), modulus_length, public_exponent.data(),
+ static_cast<unsigned int>(public_exponent.size())));
}
std::vector<uint8_t> Corrupted(const std::vector<uint8_t>& input) {
@@ -388,8 +387,8 @@ Status ImportKeyJwkFromDict(const base::DictionaryValue& dict,
scoped_ptr<base::DictionaryValue> GetJwkDictionary(
const std::vector<uint8_t>& json) {
- base::StringPiece json_string(
- reinterpret_cast<const char*>(vector_as_array(&json)), json.size());
+ base::StringPiece json_string(reinterpret_cast<const char*>(json.data()),
+ json.size());
scoped_ptr<base::Value> value = base::JSONReader::Read(json_string);
EXPECT_TRUE(value.get());
EXPECT_TRUE(value->IsType(base::Value::TYPE_DICTIONARY));
« no previous file with comments | « components/webcrypto/algorithms/sha_unittest.cc ('k') | components/webcrypto/algorithms/util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698