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

Unified Diff: content/child/webcrypto/openssl/sha_openssl.cc

Issue 410743002: [refactor] Replace custom utility function with base's "vector_as_array()" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase onto master Created 6 years, 5 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 | « content/child/webcrypto/openssl/hmac_openssl.cc ('k') | content/child/webcrypto/shared_crypto_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/webcrypto/openssl/sha_openssl.cc
diff --git a/content/child/webcrypto/openssl/sha_openssl.cc b/content/child/webcrypto/openssl/sha_openssl.cc
index 981bf3a19b37f5b40a1352e1293815142eed304f..7a2faa8534bef3cee07c5c5f0b51cba5231ea6b5 100644
--- a/content/child/webcrypto/openssl/sha_openssl.cc
+++ b/content/child/webcrypto/openssl/sha_openssl.cc
@@ -7,6 +7,7 @@
#include <openssl/sha.h>
#include "base/logging.h"
+#include "base/stl_util.h"
#include "content/child/webcrypto/algorithm_implementation.h"
#include "content/child/webcrypto/crypto_data.h"
#include "content/child/webcrypto/openssl/util_openssl.h"
@@ -60,7 +61,7 @@ class DigestorOpenSsl : public blink::WebCryptoDigestor {
Status FinishWithVectorAndStatus(std::vector<uint8_t>* result) {
const int hash_expected_size = EVP_MD_CTX_size(digest_context_.get());
result->resize(hash_expected_size);
- unsigned char* const hash_buffer = Uint8VectorStart(result);
+ unsigned char* const hash_buffer = vector_as_array(result);
unsigned int hash_buffer_size; // ignored
return FinishInternal(hash_buffer, &hash_buffer_size);
}
« no previous file with comments | « content/child/webcrypto/openssl/hmac_openssl.cc ('k') | content/child/webcrypto/shared_crypto_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698