OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/chromeos/settings/owner_key_util.h" | 5 #include "chrome/browser/chromeos/settings/owner_key_util.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/path_service.h" | 11 #include "base/path_service.h" |
12 #include "base/stl_util.h" | 12 #include "base/stl_util.h" |
13 #include "chrome/common/chrome_paths.h" | 13 #include "chromeos/chromeos_paths.h" |
14 #include "crypto/rsa_private_key.h" | 14 #include "crypto/rsa_private_key.h" |
15 | 15 |
16 namespace chromeos { | 16 namespace chromeos { |
17 | 17 |
18 /////////////////////////////////////////////////////////////////////////// | 18 /////////////////////////////////////////////////////////////////////////// |
19 // OwnerKeyUtil | 19 // OwnerKeyUtil |
20 | 20 |
21 OwnerKeyUtil* OwnerKeyUtil::Create() { | 21 OwnerKeyUtil* OwnerKeyUtil::Create() { |
22 base::FilePath owner_key_path; | 22 base::FilePath owner_key_path; |
23 CHECK(PathService::Get(chrome::FILE_OWNER_KEY, &owner_key_path)); | 23 CHECK(PathService::Get(chromeos::FILE_OWNER_KEY, &owner_key_path)); |
24 return new OwnerKeyUtilImpl(owner_key_path); | 24 return new OwnerKeyUtilImpl(owner_key_path); |
25 } | 25 } |
26 | 26 |
27 OwnerKeyUtil::OwnerKeyUtil() {} | 27 OwnerKeyUtil::OwnerKeyUtil() {} |
28 | 28 |
29 OwnerKeyUtil::~OwnerKeyUtil() {} | 29 OwnerKeyUtil::~OwnerKeyUtil() {} |
30 | 30 |
31 /////////////////////////////////////////////////////////////////////////// | 31 /////////////////////////////////////////////////////////////////////////// |
32 // OwnerKeyUtilImpl | 32 // OwnerKeyUtilImpl |
33 | 33 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 crypto::RSAPrivateKey* OwnerKeyUtilImpl::FindPrivateKey( | 68 crypto::RSAPrivateKey* OwnerKeyUtilImpl::FindPrivateKey( |
69 const std::vector<uint8>& key) { | 69 const std::vector<uint8>& key) { |
70 return crypto::RSAPrivateKey::FindFromPublicKeyInfo(key); | 70 return crypto::RSAPrivateKey::FindFromPublicKeyInfo(key); |
71 } | 71 } |
72 | 72 |
73 bool OwnerKeyUtilImpl::IsPublicKeyPresent() { | 73 bool OwnerKeyUtilImpl::IsPublicKeyPresent() { |
74 return file_util::PathExists(key_file_); | 74 return file_util::PathExists(key_file_); |
75 } | 75 } |
76 | 76 |
77 } // namespace chromeos | 77 } // namespace chromeos |
OLD | NEW |