| 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_API_CALL_FLOW_H | 5 #ifndef COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_API_CALL_FLOW_H |
| 6 #define COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_API_CALL_FLOW_H | 6 #define COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_API_CALL_FLOW_H |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "google_apis/gaia/oauth2_api_call_flow.h" | 12 #include "google_apis/gaia/oauth2_api_call_flow.h" |
| 13 | 13 |
| 14 namespace proximity_auth { | 14 namespace cryptauth { |
| 15 | 15 |
| 16 // Google API call flow implementation underlying all CryptAuth API calls. | 16 // Google API call flow implementation underlying all CryptAuth API calls. |
| 17 // CryptAuth is a Google service that manages authorization and cryptographic | 17 // CryptAuth is a Google service that manages authorization and cryptographic |
| 18 // credentials for users' devices (eg. public keys). | 18 // credentials for users' devices (eg. public keys). |
| 19 class CryptAuthApiCallFlow : public OAuth2ApiCallFlow { | 19 class CryptAuthApiCallFlow : public OAuth2ApiCallFlow { |
| 20 public: | 20 public: |
| 21 typedef base::Callback<void(const std::string& serialized_response)> | 21 typedef base::Callback<void(const std::string& serialized_response)> |
| 22 ResultCallback; | 22 ResultCallback; |
| 23 typedef base::Callback<void(const std::string& error_message)> ErrorCallback; | 23 typedef base::Callback<void(const std::string& error_message)> ErrorCallback; |
| 24 | 24 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 // Callback invoked with the serialized response message proto when the flow | 64 // Callback invoked with the serialized response message proto when the flow |
| 65 // completes successfully. | 65 // completes successfully. |
| 66 ResultCallback result_callback_; | 66 ResultCallback result_callback_; |
| 67 | 67 |
| 68 // Callback invoked with an error message when the flow fails. | 68 // Callback invoked with an error message when the flow fails. |
| 69 ErrorCallback error_callback_; | 69 ErrorCallback error_callback_; |
| 70 | 70 |
| 71 DISALLOW_COPY_AND_ASSIGN(CryptAuthApiCallFlow); | 71 DISALLOW_COPY_AND_ASSIGN(CryptAuthApiCallFlow); |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 } // namespace proximity_auth | 74 } // namespace cryptauth |
| 75 | 75 |
| 76 #endif // COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_API_CALL_FLOW_H | 76 #endif // COMPONENTS_PROXIMITY_AUTH_CRYPTAUTH_API_CALL_FLOW_H |
| OLD | NEW |