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

Unified Diff: crypto/scoped_openssl_types.h

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/scoped_nss_types.h ('k') | crypto/scoped_test_system_nss_key_slot.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crypto/scoped_openssl_types.h
diff --git a/crypto/scoped_openssl_types.h b/crypto/scoped_openssl_types.h
index 9bc5d7430930bde02e7ffb299b0c273f78c582c6..76dd0f4cd7da7d939d40203e4cbb4d26fc8e3b9c 100644
--- a/crypto/scoped_openssl_types.h
+++ b/crypto/scoped_openssl_types.h
@@ -15,7 +15,7 @@
#include <openssl/rsa.h>
#include <stdint.h>
-#include "base/memory/scoped_ptr.h"
+#include <memory>
namespace crypto {
@@ -29,7 +29,7 @@ struct OpenSSLDestroyer {
template <typename PointerType, void (*Destroyer)(PointerType*)>
using ScopedOpenSSL =
- scoped_ptr<PointerType, OpenSSLDestroyer<PointerType, Destroyer>>;
+ std::unique_ptr<PointerType, OpenSSLDestroyer<PointerType, Destroyer>>;
struct OpenSSLFree {
void operator()(uint8_t* ptr) const { OPENSSL_free(ptr); }
@@ -53,7 +53,7 @@ using ScopedEVP_PKEY_CTX = ScopedOpenSSL<EVP_PKEY_CTX, EVP_PKEY_CTX_free>;
using ScopedRSA = ScopedOpenSSL<RSA, RSA_free>;
// The bytes must have been allocated with OPENSSL_malloc.
-using ScopedOpenSSLBytes = scoped_ptr<uint8_t, OpenSSLFree>;
+using ScopedOpenSSLBytes = std::unique_ptr<uint8_t, OpenSSLFree>;
} // namespace crypto
« no previous file with comments | « crypto/scoped_nss_types.h ('k') | crypto/scoped_test_system_nss_key_slot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698