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

Side by Side Diff: chrome/browser/signin/token_service.h

Issue 16154031: Un-refcount AutofillWebData and TokenWebData (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase on ToT Created 7 years, 6 months 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 221
222 void SaveAuthTokenToDB(const std::string& service, 222 void SaveAuthTokenToDB(const std::string& service,
223 const std::string& auth_token); 223 const std::string& auth_token);
224 224
225 // Returns the index of the given service. 225 // Returns the index of the given service.
226 static int GetServiceIndex(const std::string& service); 226 static int GetServiceIndex(const std::string& service);
227 227
228 // The profile with which this instance was initialized, or NULL. 228 // The profile with which this instance was initialized, or NULL.
229 Profile* profile_; 229 Profile* profile_;
230 230
231 // Web data service to access tokens from. 231 // Web data service to access tokens from.
Lei Zhang 2013/06/07 20:42:49 Can add a comment here about ownership (or lack of
Cait (Slow) 2013/06/07 21:00:42 Done.
232 scoped_refptr<TokenWebData> token_web_data_; 232 TokenWebData* token_web_data_;
233
233 // Getter to use for fetchers. 234 // Getter to use for fetchers.
234 scoped_refptr<net::URLRequestContextGetter> getter_; 235 scoped_refptr<net::URLRequestContextGetter> getter_;
235 // Request handle to load Gaia tokens from DB. 236 // Request handle to load Gaia tokens from DB.
236 WebDataServiceBase::Handle token_loading_query_; 237 WebDataServiceBase::Handle token_loading_query_;
237 // True if token loading has completed (regardless of success). 238 // True if token loading has completed (regardless of success).
238 bool tokens_loaded_; 239 bool tokens_loaded_;
239 240
240 // Gaia request source for Gaia accounting. 241 // Gaia request source for Gaia accounting.
241 std::string source_; 242 std::string source_;
242 // Credentials from ClientLogin for Issuing auth tokens. 243 // Credentials from ClientLogin for Issuing auth tokens.
(...skipping 15 matching lines...) Expand all
258 259
259 friend class TokenServiceTest; 260 friend class TokenServiceTest;
260 FRIEND_TEST_ALL_PREFIXES(TokenServiceTest, LoadTokensIntoMemoryBasic); 261 FRIEND_TEST_ALL_PREFIXES(TokenServiceTest, LoadTokensIntoMemoryBasic);
261 FRIEND_TEST_ALL_PREFIXES(TokenServiceTest, LoadTokensIntoMemoryAdvanced); 262 FRIEND_TEST_ALL_PREFIXES(TokenServiceTest, LoadTokensIntoMemoryAdvanced);
262 FRIEND_TEST_ALL_PREFIXES(TokenServiceTest, FullIntegrationNewServicesAdded); 263 FRIEND_TEST_ALL_PREFIXES(TokenServiceTest, FullIntegrationNewServicesAdded);
263 264
264 DISALLOW_COPY_AND_ASSIGN(TokenService); 265 DISALLOW_COPY_AND_ASSIGN(TokenService);
265 }; 266 };
266 267
267 #endif // CHROME_BROWSER_SIGNIN_TOKEN_SERVICE_H_ 268 #endif // CHROME_BROWSER_SIGNIN_TOKEN_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698