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

Unified Diff: crypto/sha2.cc

Issue 1870233002: Convert crypto to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 4 years, 8 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 | « crypto/secure_hash_unittest.cc ('k') | crypto/signature_creator_nss.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crypto/sha2.cc
diff --git a/crypto/sha2.cc b/crypto/sha2.cc
index 2646d1bbd15e6583fb54827fadbed13eb5bc216d..e97b8f40376b5d34c4581bd6949380bec2b96251 100644
--- a/crypto/sha2.cc
+++ b/crypto/sha2.cc
@@ -6,14 +6,15 @@
#include <stddef.h>
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
#include "base/stl_util.h"
#include "crypto/secure_hash.h"
namespace crypto {
void SHA256HashString(const base::StringPiece& str, void* output, size_t len) {
- scoped_ptr<SecureHash> ctx(SecureHash::Create(SecureHash::SHA256));
+ std::unique_ptr<SecureHash> ctx(SecureHash::Create(SecureHash::SHA256));
ctx->Update(str.data(), str.length());
ctx->Finish(output, len);
}
« no previous file with comments | « crypto/secure_hash_unittest.cc ('k') | crypto/signature_creator_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698