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

Unified Diff: components/gcm_driver/crypto/p256_key_util.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: 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
Index: components/gcm_driver/crypto/p256_key_util.cc
diff --git a/components/gcm_driver/crypto/p256_key_util.cc b/components/gcm_driver/crypto/p256_key_util.cc
index 7fd38b561027e290262691f9a66720dd06ba872d..6f577f4125fb717609b930fd1b0b058a9e3dafb0 100644
--- a/components/gcm_driver/crypto/p256_key_util.cc
+++ b/components/gcm_driver/crypto/p256_key_util.cc
@@ -9,7 +9,6 @@
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
-#include "base/stl_util.h"
#include "crypto/ec_private_key.h"
namespace gcm {
@@ -72,11 +71,10 @@ bool CreateP256KeyPair(std::string* out_private_key,
return false;
}
- out_private_key->assign(
- reinterpret_cast<const char*>(vector_as_array(&private_key)),
- private_key.size());
+ out_private_key->assign(reinterpret_cast<const char*>(private_key.data()),
eroman 2015/11/20 00:35:14 Any reason not to use: out_private_key->assign(p
davidben 2015/11/20 19:12:50 That works? Hrm. We do this (ugly) reinterpret_cas
+ private_key.size());
out_public_key_x509->assign(
- reinterpret_cast<const char*>(vector_as_array(&public_key_x509)),
+ reinterpret_cast<const char*>(public_key_x509.data()),
eroman 2015/11/20 00:35:14 same question throughout.
davidben 2015/11/20 19:12:50 Acknowledged.
public_key_x509.size());
// Concatenate the leading 0x04 byte and the two uncompressed points.
« no previous file with comments | « no previous file | components/html_viewer/blink_platform_impl.cc » ('j') | components/webcrypto/algorithms/ecdsa.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698