OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_PROXIMITY_AUTH_PROXIMITY_AUTH_CLIENT_H_ | 5 #ifndef COMPONENTS_PROXIMITY_AUTH_PROXIMITY_AUTH_CLIENT_H_ |
6 #define COMPONENTS_PROXIMITY_AUTH_PROXIMITY_AUTH_CLIENT_H_ | 6 #define COMPONENTS_PROXIMITY_AUTH_PROXIMITY_AUTH_CLIENT_H_ |
7 | 7 |
| 8 #include <memory> |
8 #include <string> | 9 #include <string> |
9 | 10 |
10 #include "base/callback_forward.h" | 11 #include "base/callback_forward.h" |
11 #include "base/memory/scoped_ptr.h" | |
12 #include "components/proximity_auth/cryptauth/proto/cryptauth_api.pb.h" | 12 #include "components/proximity_auth/cryptauth/proto/cryptauth_api.pb.h" |
13 #include "components/proximity_auth/screenlock_state.h" | 13 #include "components/proximity_auth/screenlock_state.h" |
14 | 14 |
15 class PrefService; | 15 class PrefService; |
16 | 16 |
17 namespace proximity_auth { | 17 namespace proximity_auth { |
18 | 18 |
19 class CryptAuthClientFactory; | 19 class CryptAuthClientFactory; |
20 class CryptAuthDeviceManager; | 20 class CryptAuthDeviceManager; |
21 class CryptAuthEnrollmentManager; | 21 class CryptAuthEnrollmentManager; |
(...skipping 30 matching lines...) Expand all Loading... |
52 virtual void GetChallengeForUserAndDevice( | 52 virtual void GetChallengeForUserAndDevice( |
53 const std::string& user_id, | 53 const std::string& user_id, |
54 const std::string& remote_public_key, | 54 const std::string& remote_public_key, |
55 const std::string& channel_binding_data, | 55 const std::string& channel_binding_data, |
56 base::Callback<void(const std::string& challenge)> callback) = 0; | 56 base::Callback<void(const std::string& challenge)> callback) = 0; |
57 | 57 |
58 // Returns the PrefService used by the profile. | 58 // Returns the PrefService used by the profile. |
59 virtual PrefService* GetPrefService() = 0; | 59 virtual PrefService* GetPrefService() = 0; |
60 | 60 |
61 // Returns the SecureMessageDelegate used by the system. | 61 // Returns the SecureMessageDelegate used by the system. |
62 virtual scoped_ptr<SecureMessageDelegate> CreateSecureMessageDelegate() = 0; | 62 virtual std::unique_ptr<SecureMessageDelegate> |
| 63 CreateSecureMessageDelegate() = 0; |
63 | 64 |
64 // Constructs the CryptAuthClientFactory that can be used for API requests. | 65 // Constructs the CryptAuthClientFactory that can be used for API requests. |
65 virtual scoped_ptr<CryptAuthClientFactory> CreateCryptAuthClientFactory() = 0; | 66 virtual std::unique_ptr<CryptAuthClientFactory> |
| 67 CreateCryptAuthClientFactory() = 0; |
66 | 68 |
67 // Constructs the DeviceClassifier message that is sent to CryptAuth for all | 69 // Constructs the DeviceClassifier message that is sent to CryptAuth for all |
68 // API requests. | 70 // API requests. |
69 virtual cryptauth::DeviceClassifier GetDeviceClassifier() = 0; | 71 virtual cryptauth::DeviceClassifier GetDeviceClassifier() = 0; |
70 | 72 |
71 // Returns the account id of the user. | 73 // Returns the account id of the user. |
72 virtual std::string GetAccountId() = 0; | 74 virtual std::string GetAccountId() = 0; |
73 | 75 |
74 virtual proximity_auth::CryptAuthEnrollmentManager* | 76 virtual proximity_auth::CryptAuthEnrollmentManager* |
75 GetCryptAuthEnrollmentManager() = 0; | 77 GetCryptAuthEnrollmentManager() = 0; |
76 | 78 |
77 virtual proximity_auth::CryptAuthDeviceManager* | 79 virtual proximity_auth::CryptAuthDeviceManager* |
78 GetCryptAuthDeviceManager() = 0; | 80 GetCryptAuthDeviceManager() = 0; |
79 }; | 81 }; |
80 | 82 |
81 } // namespace proximity_auth | 83 } // namespace proximity_auth |
82 | 84 |
83 #endif // COMPONENTS_PROXIMITY_AUTH_PROXIMITY_AUTH_CLIENT_H_ | 85 #endif // COMPONENTS_PROXIMITY_AUTH_PROXIMITY_AUTH_CLIENT_H_ |
OLD | NEW |