OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_OWNERSHIP_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_OWNERSHIP_SERVICE_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_OWNERSHIP_SERVICE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_OWNERSHIP_SERVICE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/singleton.h" | |
13 #include "chrome/browser/chromeos/login/owner_key_utils.h" | 12 #include "chrome/browser/chromeos/login/owner_key_utils.h" |
14 #include "chrome/browser/chromeos/login/owner_manager.h" | 13 #include "chrome/browser/chromeos/login/owner_manager.h" |
15 | 14 |
| 15 namespace base { |
| 16 template <typename T> struct DefaultLazyInstanceTraits; |
| 17 } |
| 18 |
16 namespace chromeos { | 19 namespace chromeos { |
17 | 20 |
18 class OwnershipService { | 21 class OwnershipService { |
19 public: | 22 public: |
20 // Returns the singleton instance of the OwnershipService. | 23 // Returns the singleton instance of the OwnershipService. |
21 static OwnershipService* GetSharedInstance(); | 24 static OwnershipService* GetSharedInstance(); |
22 virtual ~OwnershipService(); | 25 virtual ~OwnershipService(); |
23 | 26 |
24 virtual bool IsAlreadyOwned(); | 27 virtual bool IsAlreadyOwned(); |
25 | 28 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 virtual void StartVerifyAttempt(const std::string& data, | 65 virtual void StartVerifyAttempt(const std::string& data, |
63 const std::vector<uint8>& signature, | 66 const std::vector<uint8>& signature, |
64 OwnerManager::Delegate* d); | 67 OwnerManager::Delegate* d); |
65 | 68 |
66 virtual bool CurrentUserIsOwner(); | 69 virtual bool CurrentUserIsOwner(); |
67 | 70 |
68 protected: | 71 protected: |
69 OwnershipService(); | 72 OwnershipService(); |
70 | 73 |
71 private: | 74 private: |
72 friend struct DefaultSingletonTraits<OwnershipService>; | 75 friend struct base::DefaultLazyInstanceTraits<OwnershipService>; |
73 friend class OwnershipServiceTest; | 76 friend class OwnershipServiceTest; |
74 | 77 |
75 scoped_refptr<OwnerManager> manager_; | 78 scoped_refptr<OwnerManager> manager_; |
76 scoped_refptr<OwnerKeyUtils> utils_; | 79 scoped_refptr<OwnerKeyUtils> utils_; |
77 }; | 80 }; |
78 | 81 |
79 } // namespace chromeos | 82 } // namespace chromeos |
80 | 83 |
81 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_OWNERSHIP_SERVICE_H_ | 84 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_OWNERSHIP_SERVICE_H_ |
OLD | NEW |