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/macros.h" | 8 #include "base/macros.h" |
9 #include "base/observer_list.h" | 9 #include "base/observer_list.h" |
10 #include "google_apis/gaia/gaia_auth_util.h" | 10 #include "google_apis/gaia/gaia_auth_util.h" |
11 #include "google_apis/gaia/oauth2_token_service.h" | 11 #include "google_apis/gaia/oauth2_token_service.h" |
12 #include "net/base/backoff_entry.h" | 12 #include "net/base/backoff_entry.h" |
13 | 13 |
14 namespace net { | 14 namespace net { |
15 class URLRequestContextGetter; | 15 class URLRequestContextGetter; |
16 } | 16 } |
17 | 17 |
18 class SigninClient; | |
19 | |
20 // Abstract base class to fetch and maintain refresh tokens from various | 18 // Abstract base class to fetch and maintain refresh tokens from various |
21 // entities. Concrete subclasses should implement RefreshTokenIsAvailable and | 19 // entities. Concrete subclasses should implement RefreshTokenIsAvailable and |
22 // CreateAccessTokenFetcher properly. | 20 // CreateAccessTokenFetcher properly. |
23 class OAuth2TokenServiceDelegate { | 21 class OAuth2TokenServiceDelegate { |
24 public: | 22 public: |
25 OAuth2TokenServiceDelegate(); | 23 OAuth2TokenServiceDelegate(); |
26 virtual ~OAuth2TokenServiceDelegate(); | 24 virtual ~OAuth2TokenServiceDelegate(); |
27 | 25 |
28 virtual OAuth2AccessTokenFetcher* CreateAccessTokenFetcher( | 26 virtual OAuth2AccessTokenFetcher* CreateAccessTokenFetcher( |
29 const std::string& account_id, | 27 const std::string& account_id, |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 void StartBatchChanges(); | 89 void StartBatchChanges(); |
92 void EndBatchChanges(); | 90 void EndBatchChanges(); |
93 | 91 |
94 // The depth of batch changes. | 92 // The depth of batch changes. |
95 int batch_change_depth_; | 93 int batch_change_depth_; |
96 | 94 |
97 DISALLOW_COPY_AND_ASSIGN(OAuth2TokenServiceDelegate); | 95 DISALLOW_COPY_AND_ASSIGN(OAuth2TokenServiceDelegate); |
98 }; | 96 }; |
99 | 97 |
100 #endif // GOOGLE_APIS_GAIA_OAUTH2_TOKEN_SERVICE_DELEGATE_H_ | 98 #endif // GOOGLE_APIS_GAIA_OAUTH2_TOKEN_SERVICE_DELEGATE_H_ |
OLD | NEW |