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 #ifndef COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_CLIENT_H | 5 #ifndef COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_CLIENT_H |
6 #define COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_CLIENT_H | 6 #define COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_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/macros.h" | 12 #include "base/macros.h" |
12 #include "base/memory/scoped_ptr.h" | |
13 | 13 |
14 namespace cryptauth { | 14 namespace cryptauth { |
15 class DeviceClassifier; | 15 class DeviceClassifier; |
16 class GetMyDevicesRequest; | 16 class GetMyDevicesRequest; |
17 class GetMyDevicesResponse; | 17 class GetMyDevicesResponse; |
18 class FindEligibleUnlockDevicesRequest; | 18 class FindEligibleUnlockDevicesRequest; |
19 class FindEligibleUnlockDevicesResponse; | 19 class FindEligibleUnlockDevicesResponse; |
20 class SendDeviceSyncTickleRequest; | 20 class SendDeviceSyncTickleRequest; |
21 class SendDeviceSyncTickleResponse; | 21 class SendDeviceSyncTickleResponse; |
22 class ToggleEasyUnlockRequest; | 22 class ToggleEasyUnlockRequest; |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 virtual std::string GetAccessTokenUsed() = 0; | 100 virtual std::string GetAccessTokenUsed() = 0; |
101 }; | 101 }; |
102 | 102 |
103 // Interface for creating CryptAuthClient instances. Because each | 103 // Interface for creating CryptAuthClient instances. Because each |
104 // CryptAuthClient instance can only be used for one API call, a factory makes | 104 // CryptAuthClient instance can only be used for one API call, a factory makes |
105 // it easier to make multiple requests in sequence or in parallel. | 105 // it easier to make multiple requests in sequence or in parallel. |
106 class CryptAuthClientFactory { | 106 class CryptAuthClientFactory { |
107 public: | 107 public: |
108 virtual ~CryptAuthClientFactory() {} | 108 virtual ~CryptAuthClientFactory() {} |
109 | 109 |
110 virtual scoped_ptr<CryptAuthClient> CreateInstance() = 0; | 110 virtual std::unique_ptr<CryptAuthClient> CreateInstance() = 0; |
111 }; | 111 }; |
112 | 112 |
113 } // namespace proximity_auth | 113 } // namespace proximity_auth |
114 | 114 |
115 #endif // COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_CLIENT_H | 115 #endif // COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_CLIENT_H |
OLD | NEW |