OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 COMPONENTS_CRYPTAUTH_CRYPTAUTH_SERVICE_H_ | 5 #ifndef COMPONENTS_CRYPTAUTH_CRYPTAUTH_SERVICE_H_ |
6 #define COMPONENTS_CRYPTAUTH_CRYPTAUTH_SERVICE_H_ | 6 #define COMPONENTS_CRYPTAUTH_CRYPTAUTH_SERVICE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "components/cryptauth/proto/cryptauth_api.pb.h" | 11 #include "components/cryptauth/proto/cryptauth_api.pb.h" |
| 12 #include "components/prefs/pref_registry_simple.h" |
12 | 13 |
13 namespace cryptauth { | 14 namespace cryptauth { |
14 | 15 |
15 class CryptAuthClientFactory; | 16 class CryptAuthClientFactory; |
16 class CryptAuthDeviceManager; | 17 class CryptAuthDeviceManager; |
17 class CryptAuthEnrollmentManager; | 18 class CryptAuthEnrollmentManager; |
18 class SecureMessageDelegate; | 19 class SecureMessageDelegate; |
19 | 20 |
20 // Service which provides access to various CryptAuth singletons. | 21 // Service which provides access to various CryptAuth singletons. |
21 class CryptAuthService { | 22 class CryptAuthService { |
22 public: | 23 public: |
| 24 static void RegisterProfilePrefs(PrefRegistrySimple* registry); |
| 25 |
23 virtual CryptAuthDeviceManager* GetCryptAuthDeviceManager() = 0; | 26 virtual CryptAuthDeviceManager* GetCryptAuthDeviceManager() = 0; |
24 virtual CryptAuthEnrollmentManager* GetCryptAuthEnrollmentManager() = 0; | 27 virtual CryptAuthEnrollmentManager* GetCryptAuthEnrollmentManager() = 0; |
25 virtual DeviceClassifier GetDeviceClassifier() = 0; | 28 virtual DeviceClassifier GetDeviceClassifier() = 0; |
26 virtual std::string GetAccountId() = 0; | 29 virtual std::string GetAccountId() = 0; |
27 virtual std::unique_ptr<SecureMessageDelegate> | 30 virtual std::unique_ptr<SecureMessageDelegate> |
28 CreateSecureMessageDelegate() = 0; | 31 CreateSecureMessageDelegate() = 0; |
29 virtual std::unique_ptr<CryptAuthClientFactory> | 32 virtual std::unique_ptr<CryptAuthClientFactory> |
30 CreateCryptAuthClientFactory() = 0; | 33 CreateCryptAuthClientFactory() = 0; |
31 | 34 |
32 protected: | 35 protected: |
33 CryptAuthService() {} | 36 CryptAuthService() {} |
34 virtual ~CryptAuthService() {} | 37 virtual ~CryptAuthService() {} |
35 | 38 |
36 private: | 39 private: |
37 DISALLOW_COPY_AND_ASSIGN(CryptAuthService); | 40 DISALLOW_COPY_AND_ASSIGN(CryptAuthService); |
38 }; | 41 }; |
39 | 42 |
40 } // namespace cryptauth | 43 } // namespace cryptauth |
41 | 44 |
42 #endif // COMPONENTS_CRYPTAUTH_CRYPTAUTH_SERVICE_H_ | 45 #endif // COMPONENTS_CRYPTAUTH_CRYPTAUTH_SERVICE_H_ |
OLD | NEW |