OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // The TokenService will supply authentication tokens for any service that | 5 // The TokenService will supply authentication tokens for any service that |
6 // needs it, such as sync. Whenever the user logs in, a controller watching | 6 // needs it, such as sync. Whenever the user logs in, a controller watching |
7 // the token service is expected either to call ClientLogin to derive a new | 7 // the token service is expected either to call ClientLogin to derive a new |
8 // SID and LSID, or to use GAIA OAuth requests to derive an OAuth1 access | 8 // SID and LSID, or to use GAIA OAuth requests to derive an OAuth1 access |
9 // token for the OAuthLogin scope. Whenever such credentials are available, | 9 // token for the OAuthLogin scope. Whenever such credentials are available, |
10 // the TokenService should be updated with new credentials. The controller | 10 // the TokenService should be updated with new credentials. The controller |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 // Credentials from Gaia OAuth (uber/login token) | 238 // Credentials from Gaia OAuth (uber/login token) |
239 std::string oauth_token_; | 239 std::string oauth_token_; |
240 std::string oauth_secret_; | 240 std::string oauth_secret_; |
241 | 241 |
242 // Size of array of services capable of ClientLogin-based authentication. | 242 // Size of array of services capable of ClientLogin-based authentication. |
243 // This value must be defined here. | 243 // This value must be defined here. |
244 // NOTE: The use of --enable-sync-oauth does not affect this count. The | 244 // NOTE: The use of --enable-sync-oauth does not affect this count. The |
245 // TokenService can continue to do some degree of ClientLogin token | 245 // TokenService can continue to do some degree of ClientLogin token |
246 // management, mostly related to persistence while Sync and possibly other | 246 // management, mostly related to persistence while Sync and possibly other |
247 // services are using OAuth-based authentication. | 247 // services are using OAuth-based authentication. |
248 static const int kNumServices = 6; | 248 static const int kNumServices = 5; |
249 // List of services that are capable of ClientLogin-based authentication. | 249 // List of services that are capable of ClientLogin-based authentication. |
250 static const char* kServices[kNumServices]; | 250 static const char* kServices[kNumServices]; |
251 // A bunch of fetchers suitable for ClientLogin token issuing. We don't care | 251 // A bunch of fetchers suitable for ClientLogin token issuing. We don't care |
252 // about the ordering, nor do we care which is for which service. | 252 // about the ordering, nor do we care which is for which service. |
253 scoped_ptr<GaiaAuthFetcher> fetchers_[kNumServices]; | 253 scoped_ptr<GaiaAuthFetcher> fetchers_[kNumServices]; |
254 | 254 |
255 // Size of array of services capable of OAuth-based authentication. This | 255 // Size of array of services capable of OAuth-based authentication. This |
256 // value must be defined here. | 256 // value must be defined here. |
257 // NOTE: The use of --enable-sync-oauth does not affect this count. The | 257 // NOTE: The use of --enable-sync-oauth does not affect this count. The |
258 // TokenService can continue to do some degree of OAuth token | 258 // TokenService can continue to do some degree of OAuth token |
(...skipping 13 matching lines...) Expand all Loading... |
272 | 272 |
273 friend class TokenServiceTest; | 273 friend class TokenServiceTest; |
274 FRIEND_TEST_ALL_PREFIXES(TokenServiceTest, LoadTokensIntoMemoryBasic); | 274 FRIEND_TEST_ALL_PREFIXES(TokenServiceTest, LoadTokensIntoMemoryBasic); |
275 FRIEND_TEST_ALL_PREFIXES(TokenServiceTest, LoadTokensIntoMemoryAdvanced); | 275 FRIEND_TEST_ALL_PREFIXES(TokenServiceTest, LoadTokensIntoMemoryAdvanced); |
276 FRIEND_TEST_ALL_PREFIXES(TokenServiceTest, FullIntegrationNewServicesAdded); | 276 FRIEND_TEST_ALL_PREFIXES(TokenServiceTest, FullIntegrationNewServicesAdded); |
277 | 277 |
278 DISALLOW_COPY_AND_ASSIGN(TokenService); | 278 DISALLOW_COPY_AND_ASSIGN(TokenService); |
279 }; | 279 }; |
280 | 280 |
281 #endif // CHROME_BROWSER_NET_GAIA_TOKEN_SERVICE_H_ | 281 #endif // CHROME_BROWSER_NET_GAIA_TOKEN_SERVICE_H_ |
OLD | NEW |