| 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 GOOGLE_APIS_GAIA_OAUTH2_TOKEN_SERVICE_DELEGATE_H_ | 5 #ifndef GOOGLE_APIS_GAIA_OAUTH2_TOKEN_SERVICE_DELEGATE_H_ |
| 6 #define GOOGLE_APIS_GAIA_OAUTH2_TOKEN_SERVICE_DELEGATE_H_ | 6 #define GOOGLE_APIS_GAIA_OAUTH2_TOKEN_SERVICE_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "base/observer_list.h" | 8 #include "base/observer_list.h" |
| 9 #include "google_apis/gaia/gaia_auth_util.h" | 9 #include "google_apis/gaia/gaia_auth_util.h" |
| 10 #include "google_apis/gaia/oauth2_token_service.h" | 10 #include "google_apis/gaia/oauth2_token_service.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 public: | 22 public: |
| 23 OAuth2TokenServiceDelegate(); | 23 OAuth2TokenServiceDelegate(); |
| 24 virtual ~OAuth2TokenServiceDelegate(); | 24 virtual ~OAuth2TokenServiceDelegate(); |
| 25 | 25 |
| 26 virtual OAuth2AccessTokenFetcher* CreateAccessTokenFetcher( | 26 virtual OAuth2AccessTokenFetcher* CreateAccessTokenFetcher( |
| 27 const std::string& account_id, | 27 const std::string& account_id, |
| 28 net::URLRequestContextGetter* getter, | 28 net::URLRequestContextGetter* getter, |
| 29 OAuth2AccessTokenConsumer* consumer) = 0; | 29 OAuth2AccessTokenConsumer* consumer) = 0; |
| 30 | 30 |
| 31 virtual bool RefreshTokenIsAvailable(const std::string& account_id) const = 0; | 31 virtual bool RefreshTokenIsAvailable(const std::string& account_id) const = 0; |
| 32 virtual bool RefreshTokenHasError(const std::string& account_id) const; |
| 32 virtual void UpdateAuthError(const std::string& account_id, | 33 virtual void UpdateAuthError(const std::string& account_id, |
| 33 const GoogleServiceAuthError& error){}; | 34 const GoogleServiceAuthError& error) {} |
| 34 | 35 |
| 35 virtual std::vector<std::string> GetAccounts(); | 36 virtual std::vector<std::string> GetAccounts(); |
| 36 virtual void RevokeAllCredentials(){}; | 37 virtual void RevokeAllCredentials(){}; |
| 37 | 38 |
| 38 virtual void InvalidateAccessToken(const std::string& account_id, | 39 virtual void InvalidateAccessToken(const std::string& account_id, |
| 39 const std::string& client_id, | 40 const std::string& client_id, |
| 40 const std::set<std::string>& scopes, | 41 const std::set<std::string>& scopes, |
| 41 const std::string& access_token) {} | 42 const std::string& access_token) {} |
| 42 | 43 |
| 43 virtual void Shutdown() {} | 44 virtual void Shutdown() {} |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 void StartBatchChanges(); | 79 void StartBatchChanges(); |
| 79 void EndBatchChanges(); | 80 void EndBatchChanges(); |
| 80 | 81 |
| 81 // The depth of batch changes. | 82 // The depth of batch changes. |
| 82 int batch_change_depth_; | 83 int batch_change_depth_; |
| 83 | 84 |
| 84 DISALLOW_COPY_AND_ASSIGN(OAuth2TokenServiceDelegate); | 85 DISALLOW_COPY_AND_ASSIGN(OAuth2TokenServiceDelegate); |
| 85 }; | 86 }; |
| 86 | 87 |
| 87 #endif // GOOGLE_APIS_GAIA_OAUTH2_TOKEN_SERVICE_DELEGATE_H_ | 88 #endif // GOOGLE_APIS_GAIA_OAUTH2_TOKEN_SERVICE_DELEGATE_H_ |
| OLD | NEW |