OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_GOOGLE_APIS_AUTH_SERVICE_INTERFACE_H_ | 5 #ifndef CHROME_BROWSER_GOOGLE_APIS_AUTH_SERVICE_INTERFACE_H_ |
6 #define CHROME_BROWSER_GOOGLE_APIS_AUTH_SERVICE_INTERFACE_H_ | 6 #define CHROME_BROWSER_GOOGLE_APIS_AUTH_SERVICE_INTERFACE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "chrome/browser/google_apis/base_operations.h" | 10 #include "base/callback_forward.h" |
11 #include "chrome/browser/google_apis/gdata_errorcode.h" | 11 #include "chrome/browser/google_apis/gdata_errorcode.h" |
12 | 12 |
13 class Profile; | 13 class Profile; |
14 | 14 |
15 namespace google_apis { | 15 namespace google_apis { |
16 | 16 |
| 17 class AuthServiceObserver; |
17 class OperationRegistry; | 18 class OperationRegistry; |
18 class AuthServiceObserver; | |
19 | 19 |
20 // Called when fetching of access token is complete. | 20 // Called when fetching of access token is complete. |
21 typedef base::Callback<void(GDataErrorCode error, | 21 typedef base::Callback<void(GDataErrorCode error, |
22 const std::string& access_token)> | 22 const std::string& access_token)> |
23 AuthStatusCallback; | 23 AuthStatusCallback; |
24 | 24 |
25 // This defines an interface for the authentication service which is required | 25 // This defines an interface for the authentication service which is required |
26 // by authenticated operations (AuthenticatedOperationInterface). | 26 // by authenticated operations (AuthenticatedOperationInterface). |
27 // All functions must be called on UI thread. | 27 // All functions must be called on UI thread. |
28 class AuthServiceInterface { | 28 class AuthServiceInterface { |
(...skipping 27 matching lines...) Expand all Loading... |
56 // Clears OAuth2 access token. | 56 // Clears OAuth2 access token. |
57 virtual void ClearAccessToken() = 0; | 57 virtual void ClearAccessToken() = 0; |
58 | 58 |
59 // Clears OAuth2 refresh token. | 59 // Clears OAuth2 refresh token. |
60 virtual void ClearRefreshToken() = 0; | 60 virtual void ClearRefreshToken() = 0; |
61 }; | 61 }; |
62 | 62 |
63 } // namespace google_apis | 63 } // namespace google_apis |
64 | 64 |
65 #endif // CHROME_BROWSER_GOOGLE_APIS_AUTH_SERVICE_INTERFACE_H_ | 65 #endif // CHROME_BROWSER_GOOGLE_APIS_AUTH_SERVICE_INTERFACE_H_ |
OLD | NEW |