| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_H_ | 5 #ifndef GOOGLE_APIS_GAIA_OAUTH2_TOKEN_SERVICE_H_ |
| 6 #define GOOGLE_APIS_GAIA_OAUTH2_TOKEN_SERVICE_H_ | 6 #define GOOGLE_APIS_GAIA_OAUTH2_TOKEN_SERVICE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 // The cache of currently valid tokens. | 378 // The cache of currently valid tokens. |
| 379 typedef std::map<RequestParameters, CacheEntry> TokenCache; | 379 typedef std::map<RequestParameters, CacheEntry> TokenCache; |
| 380 TokenCache token_cache_; | 380 TokenCache token_cache_; |
| 381 | 381 |
| 382 // A map from fetch parameters to a fetcher that is fetching an OAuth2 access | 382 // A map from fetch parameters to a fetcher that is fetching an OAuth2 access |
| 383 // token using these parameters. | 383 // token using these parameters. |
| 384 PendingFetcherMap pending_fetchers_; | 384 PendingFetcherMap pending_fetchers_; |
| 385 | 385 |
| 386 // List of observers to notify when refresh token availability changes. | 386 // List of observers to notify when refresh token availability changes. |
| 387 // Makes sure list is empty on destruction. | 387 // Makes sure list is empty on destruction. |
| 388 ObserverList<Observer, true> observer_list_; | 388 base::ObserverList<Observer, true> observer_list_; |
| 389 | 389 |
| 390 // List of observers to notify when access token status changes. | 390 // List of observers to notify when access token status changes. |
| 391 ObserverList<DiagnosticsObserver, true> diagnostics_observer_list_; | 391 base::ObserverList<DiagnosticsObserver, true> diagnostics_observer_list_; |
| 392 | 392 |
| 393 // The depth of batch changes. | 393 // The depth of batch changes. |
| 394 int batch_change_depth_; | 394 int batch_change_depth_; |
| 395 | 395 |
| 396 // Maximum number of retries in fetching an OAuth2 access token. | 396 // Maximum number of retries in fetching an OAuth2 access token. |
| 397 static int max_fetch_retry_num_; | 397 static int max_fetch_retry_num_; |
| 398 | 398 |
| 399 FRIEND_TEST_ALL_PREFIXES(OAuth2TokenServiceTest, RequestParametersOrderTest); | 399 FRIEND_TEST_ALL_PREFIXES(OAuth2TokenServiceTest, RequestParametersOrderTest); |
| 400 FRIEND_TEST_ALL_PREFIXES(OAuth2TokenServiceTest, | 400 FRIEND_TEST_ALL_PREFIXES(OAuth2TokenServiceTest, |
| 401 SameScopesRequestedForDifferentClients); | 401 SameScopesRequestedForDifferentClients); |
| 402 | 402 |
| 403 DISALLOW_COPY_AND_ASSIGN(OAuth2TokenService); | 403 DISALLOW_COPY_AND_ASSIGN(OAuth2TokenService); |
| 404 }; | 404 }; |
| 405 | 405 |
| 406 #endif // GOOGLE_APIS_GAIA_OAUTH2_TOKEN_SERVICE_H_ | 406 #endif // GOOGLE_APIS_GAIA_OAUTH2_TOKEN_SERVICE_H_ |
| OLD | NEW |