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

Unified Diff: components/webcrypto/algorithms/ec.cc

Issue 1548203002: Convert Pass()→std::move() in //components/[n-z]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bad headers Created 5 years 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/webcrypto/algorithms/asymmetric_key_util.cc ('k') | components/webcrypto/algorithms/rsa.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/webcrypto/algorithms/ec.cc
diff --git a/components/webcrypto/algorithms/ec.cc b/components/webcrypto/algorithms/ec.cc
index 11d4c58661e36b1e0e47545c1fdc72e278ae8880..33420ff259d5aa5cb4f4851a9c9d7e28ab877716 100644
--- a/components/webcrypto/algorithms/ec.cc
+++ b/components/webcrypto/algorithms/ec.cc
@@ -9,6 +9,7 @@
#include <openssl/evp.h>
#include <openssl/pkcs12.h>
#include <stddef.h>
+#include <utility>
#include "base/logging.h"
#include "base/macros.h"
@@ -276,12 +277,12 @@ Status EcAlgorithm::GenerateKey(const blink::WebCryptoAlgorithm& algorithm,
// Note that extractable is unconditionally set to true. This is because per
// the WebCrypto spec generated public keys are always extractable.
- status = CreateWebCryptoPublicKey(public_pkey.Pass(), key_algorithm, true,
+ status = CreateWebCryptoPublicKey(std::move(public_pkey), key_algorithm, true,
public_usages, &public_key);
if (status.IsError())
return status;
- status = CreateWebCryptoPrivateKey(private_pkey.Pass(), key_algorithm,
+ status = CreateWebCryptoPrivateKey(std::move(private_pkey), key_algorithm,
extractable, private_usages, &private_key);
if (status.IsError())
return status;
@@ -316,7 +317,7 @@ Status EcAlgorithm::ImportKeyPkcs8(const CryptoData& key_data,
if (status.IsError())
return status;
- return CreateWebCryptoPrivateKey(private_key.Pass(),
+ return CreateWebCryptoPrivateKey(std::move(private_key),
blink::WebCryptoKeyAlgorithm::createEc(
algorithm.id(), params->namedCurve()),
extractable, usages, key);
@@ -341,7 +342,7 @@ Status EcAlgorithm::ImportKeySpki(const CryptoData& key_data,
if (status.IsError())
return status;
- return CreateWebCryptoPublicKey(public_key.Pass(),
+ return CreateWebCryptoPublicKey(std::move(public_key),
blink::WebCryptoKeyAlgorithm::createEc(
algorithm.id(), params->namedCurve()),
extractable, usages, key);
@@ -448,10 +449,10 @@ Status EcAlgorithm::ImportKeyJwk(const CryptoData& key_data,
// Wrap the EVP_PKEY into a WebCryptoKey
if (is_private_key) {
- return CreateWebCryptoPrivateKey(pkey.Pass(), key_algorithm, extractable,
- usages, key);
+ return CreateWebCryptoPrivateKey(std::move(pkey), key_algorithm,
+ extractable, usages, key);
}
- return CreateWebCryptoPublicKey(pkey.Pass(), key_algorithm, extractable,
+ return CreateWebCryptoPublicKey(std::move(pkey), key_algorithm, extractable,
usages, key);
}
« no previous file with comments | « components/webcrypto/algorithms/asymmetric_key_util.cc ('k') | components/webcrypto/algorithms/rsa.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698