summaryrefslogtreecommitdiffstats
path: root/components/ownership
diff options
context:
space:
mode:
authordcheng <dcheng@chromium.org>2015-12-30 20:54:47 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-31 04:56:00 +0000
commitdc5f124021b338adc8caa533583eab97813558fe (patch)
treee7142722319d1beb1a969eb019572a5631764248 /components/ownership
parent902fcc5c3732cf387828f7e0c10a810e5bf85714 (diff)
downloadchromium_src-dc5f124021b338adc8caa533583eab97813558fe.zip
chromium_src-dc5f124021b338adc8caa533583eab97813558fe.tar.gz
chromium_src-dc5f124021b338adc8caa533583eab97813558fe.tar.bz2
Convert Pass()→std::move() in //components (CrOS edition)
(╯^□^)╯︵ ❄☃❄ BUG=557422 R=avi@chromium.org TBR=caitkp@chromium.org Review URL: https://codereview.chromium.org/1552023002 Cr-Commit-Position: refs/heads/master@{#367228}
Diffstat (limited to 'components/ownership')
-rw-r--r--components/ownership/owner_key_util.cc6
-rw-r--r--components/ownership/owner_key_util_impl.cc2
-rw-r--r--components/ownership/owner_settings_service.cc4
3 files changed, 7 insertions, 5 deletions
diff --git a/components/ownership/owner_key_util.cc b/components/ownership/owner_key_util.cc
index a049729..55b5fd4 100644
--- a/components/ownership/owner_key_util.cc
+++ b/components/ownership/owner_key_util.cc
@@ -4,6 +4,8 @@
#include "components/ownership/owner_key_util.h"
+#include <utility>
+
namespace ownership {
///////////////////////////////////////////////////////////////////////////
@@ -18,8 +20,8 @@ PublicKey::~PublicKey() {
///////////////////////////////////////////////////////////////////////////
// PrivateKey
-PrivateKey::PrivateKey(crypto::ScopedSECKEYPrivateKey key) : key_(key.Pass()) {
-}
+PrivateKey::PrivateKey(crypto::ScopedSECKEYPrivateKey key)
+ : key_(std::move(key)) {}
PrivateKey::~PrivateKey() {
}
diff --git a/components/ownership/owner_key_util_impl.cc b/components/ownership/owner_key_util_impl.cc
index 0d36ede..04547ce 100644
--- a/components/ownership/owner_key_util_impl.cc
+++ b/components/ownership/owner_key_util_impl.cc
@@ -63,7 +63,7 @@ crypto::ScopedSECKEYPrivateKey OwnerKeyUtilImpl::FindPrivateKeyInSlot(
crypto::FindNSSKeyFromPublicKeyInfoInSlot(key, slot));
if (!private_key || SECKEY_GetPrivateKeyType(private_key.get()) != rsaKey)
return nullptr;
- return private_key.Pass();
+ return private_key;
}
bool OwnerKeyUtilImpl::IsPublicKeyPresent() {
diff --git a/components/ownership/owner_settings_service.cc b/components/ownership/owner_settings_service.cc
index b15609e..4990594 100644
--- a/components/ownership/owner_settings_service.cc
+++ b/components/ownership/owner_settings_service.cc
@@ -37,7 +37,7 @@ scoped_ptr<em::PolicyFetchResponse> AssembleAndSignPolicy(
new em::PolicyFetchResponse());
if (!policy->SerializeToString(policy_response->mutable_policy_data())) {
LOG(ERROR) << "Failed to encode policy payload.";
- return scoped_ptr<em::PolicyFetchResponse>(nullptr).Pass();
+ return scoped_ptr<em::PolicyFetchResponse>(nullptr);
}
ScopedSGNContext sign_context(
@@ -62,7 +62,7 @@ scoped_ptr<em::PolicyFetchResponse> AssembleAndSignPolicy(
reinterpret_cast<const char*>(signature_item.data), signature_item.len);
SECITEM_FreeItem(&signature_item, PR_FALSE);
- return policy_response.Pass();
+ return policy_response;
}
} // namepace