| OLD | NEW |
| 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 <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "base/file_util.h" | 9 #include "base/files/file_util.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "crypto/rsa_private_key.h" | 11 #include "crypto/rsa_private_key.h" |
| 12 | 12 |
| 13 namespace ownership { | 13 namespace ownership { |
| 14 | 14 |
| 15 OwnerKeyUtilImpl::OwnerKeyUtilImpl(const base::FilePath& public_key_file) | 15 OwnerKeyUtilImpl::OwnerKeyUtilImpl(const base::FilePath& public_key_file) |
| 16 : public_key_file_(public_key_file) { | 16 : public_key_file_(public_key_file) { |
| 17 } | 17 } |
| 18 | 18 |
| 19 OwnerKeyUtilImpl::~OwnerKeyUtilImpl() { | 19 OwnerKeyUtilImpl::~OwnerKeyUtilImpl() { |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 PK11SlotInfo* slot) { | 56 PK11SlotInfo* slot) { |
| 57 return crypto::RSAPrivateKey::FindFromPublicKeyInfoInSlot(key, slot); | 57 return crypto::RSAPrivateKey::FindFromPublicKeyInfoInSlot(key, slot); |
| 58 } | 58 } |
| 59 #endif // defined(USE_NSS) | 59 #endif // defined(USE_NSS) |
| 60 | 60 |
| 61 bool OwnerKeyUtilImpl::IsPublicKeyPresent() { | 61 bool OwnerKeyUtilImpl::IsPublicKeyPresent() { |
| 62 return base::PathExists(public_key_file_); | 62 return base::PathExists(public_key_file_); |
| 63 } | 63 } |
| 64 | 64 |
| 65 } // namespace ownership | 65 } // namespace ownership |
| OLD | NEW |