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

Side by Side Diff: components/ownership/owner_key_util_impl.cc

Issue 1552023002: Convert Pass()→std::move() in //components (CrOS edition) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 unified diff | Download patch
« no previous file with comments | « components/ownership/owner_key_util.cc ('k') | components/ownership/owner_settings_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/ownership/owner_key_util_impl.h" 5 #include "components/ownership/owner_key_util_impl.h"
6 6
7 #include <keythi.h> 7 #include <keythi.h>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 crypto::ScopedSECKEYPrivateKey OwnerKeyUtilImpl::FindPrivateKeyInSlot( 56 crypto::ScopedSECKEYPrivateKey OwnerKeyUtilImpl::FindPrivateKeyInSlot(
57 const std::vector<uint8_t>& key, 57 const std::vector<uint8_t>& key,
58 PK11SlotInfo* slot) { 58 PK11SlotInfo* slot) {
59 if (!slot) 59 if (!slot)
60 return nullptr; 60 return nullptr;
61 61
62 crypto::ScopedSECKEYPrivateKey private_key( 62 crypto::ScopedSECKEYPrivateKey private_key(
63 crypto::FindNSSKeyFromPublicKeyInfoInSlot(key, slot)); 63 crypto::FindNSSKeyFromPublicKeyInfoInSlot(key, slot));
64 if (!private_key || SECKEY_GetPrivateKeyType(private_key.get()) != rsaKey) 64 if (!private_key || SECKEY_GetPrivateKeyType(private_key.get()) != rsaKey)
65 return nullptr; 65 return nullptr;
66 return private_key.Pass(); 66 return private_key;
67 } 67 }
68 68
69 bool OwnerKeyUtilImpl::IsPublicKeyPresent() { 69 bool OwnerKeyUtilImpl::IsPublicKeyPresent() {
70 return base::PathExists(public_key_file_); 70 return base::PathExists(public_key_file_);
71 } 71 }
72 72
73 } // namespace ownership 73 } // namespace ownership
OLDNEW
« no previous file with comments | « components/ownership/owner_key_util.cc ('k') | components/ownership/owner_settings_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698