Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Side by Side Diff: chrome/browser/net/gaia/token_service.h

Issue 8742008: ChromeOS: Use OAuth2 refresh token to download GAIA info (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/chromeos/login/user_manager.cc ('k') | chrome/browser/net/gaia/token_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/user_manager.cc ('k') | chrome/browser/net/gaia/token_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698