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

Unified Diff: crypto/ec_private_key_nss.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 | « components/user_prefs/tracked/pref_hash_calculator.cc ('k') | crypto/ec_private_key_openssl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crypto/ec_private_key_nss.cc
diff --git a/crypto/ec_private_key_nss.cc b/crypto/ec_private_key_nss.cc
index 989b7ade2025996b329adfc115cbabd3515fc743..8ca8f25ecafedfa3630b7c851ef5ce707c8de2b6 100644
--- a/crypto/ec_private_key_nss.cc
+++ b/crypto/ec_private_key_nss.cc
@@ -17,8 +17,9 @@ extern "C" {
#include <stddef.h>
#include <stdint.h>
+#include <memory>
+
#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
#include "crypto/nss_util.h"
#include "crypto/nss_util_internal.h"
#include "crypto/scoped_nss_types.h"
@@ -61,7 +62,7 @@ ECPrivateKey* ECPrivateKey::Create() {
if (!slot)
return nullptr;
- scoped_ptr<ECPrivateKey> result(new ECPrivateKey);
+ std::unique_ptr<ECPrivateKey> result(new ECPrivateKey);
SECOidData* oid_data = SECOID_FindOIDByTag(SEC_OID_SECG_EC_SECP256R1);
if (!oid_data) {
@@ -111,7 +112,7 @@ ECPrivateKey* ECPrivateKey::CreateFromEncryptedPrivateKeyInfo(
if (!slot)
return nullptr;
- scoped_ptr<ECPrivateKey> result(new ECPrivateKey);
+ std::unique_ptr<ECPrivateKey> result(new ECPrivateKey);
SECItem encoded_spki = {
siBuffer,
@@ -224,7 +225,7 @@ bool ECPrivateKey::ImportFromEncryptedPrivateKeyInfo(
}
ECPrivateKey* ECPrivateKey::Copy() const {
- scoped_ptr<ECPrivateKey> copy(new ECPrivateKey);
+ std::unique_ptr<ECPrivateKey> copy(new ECPrivateKey);
if (key_) {
copy->key_ = SECKEY_CopyPrivateKey(key_);
if (!copy->key_)
« no previous file with comments | « components/user_prefs/tracked/pref_hash_calculator.cc ('k') | crypto/ec_private_key_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698