Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(329)

Side by Side Diff: components/cryptauth/cryptauth_client.h

Issue 2502343003: Moved //components/proximity_auth/cryptauth to //components/cryptauth. (Closed)
Patch Set: Fixed proto #includes. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 13 matching lines...) Expand all
24 class SetupEnrollmentRequest; 24 class SetupEnrollmentRequest;
25 class SetupEnrollmentResponse; 25 class SetupEnrollmentResponse;
26 class FinishEnrollmentRequest; 26 class FinishEnrollmentRequest;
27 class FinishEnrollmentResponse; 27 class FinishEnrollmentResponse;
28 } 28 }
29 29
30 namespace net { 30 namespace net {
31 class URLRequestContextGetter; 31 class URLRequestContextGetter;
32 } 32 }
33 33
34 namespace proximity_auth { 34 namespace cryptauth {
35 35
36 class CryptAuthAccessTokenFetcher; 36 class CryptAuthAccessTokenFetcher;
37 class CryptAuthApiCallFlow; 37 class CryptAuthApiCallFlow;
38 38
39 // Interface for making API requests to the CryptAuth service, which 39 // Interface for making API requests to the CryptAuth service, which
40 // manages cryptographic credentials (ie. public keys) for a user's devices. 40 // manages cryptographic credentials (ie. public keys) for a user's devices.
41 // Implmentations shall only processes a single request, so create a new 41 // Implmentations shall only processes a single request, so create a new
42 // instance for each request you make. DO NOT REUSE. 42 // instance for each request you make. DO NOT REUSE.
43 // For documentation on each API call, see 43 // For documentation on each API call, see
44 // components/proximity_auth/cryptauth/proto/cryptauth_api.proto 44 // components/cryptauth/proto/cryptauth_api.proto
45 class CryptAuthClient { 45 class CryptAuthClient {
46 public: 46 public:
47 typedef base::Callback<void(const std::string&)> ErrorCallback; 47 typedef base::Callback<void(const std::string&)> ErrorCallback;
48 48
49 virtual ~CryptAuthClient() {} 49 virtual ~CryptAuthClient() {}
50 50
51 // GetMyDevices 51 // GetMyDevices
52 typedef base::Callback<void(const cryptauth::GetMyDevicesResponse&)> 52 typedef base::Callback<void(const cryptauth::GetMyDevicesResponse&)>
53 GetMyDevicesCallback; 53 GetMyDevicesCallback;
54 virtual void GetMyDevices(const cryptauth::GetMyDevicesRequest& request, 54 virtual void GetMyDevices(const cryptauth::GetMyDevicesRequest& request,
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 std::unique_ptr<CryptAuthClient> CreateInstance() = 0; 110 virtual std::unique_ptr<CryptAuthClient> CreateInstance() = 0;
111 }; 111 };
112 112
113 } // namespace proximity_auth 113 } // namespace cryptauth
114 114
115 #endif // COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_CLIENT_H 115 #endif // COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_CLIENT_H
OLDNEW
« no previous file with comments | « components/cryptauth/cryptauth_api_call_flow_unittest.cc ('k') | components/cryptauth/cryptauth_client_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698