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

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

Issue 10656033: [sync] Automatic bootstrapping of Sync on Win 8 from cached credentials (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix TokenServiceTests Created 8 years, 5 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 virtual void Observe(int type, 175 virtual void Observe(int type,
176 const content::NotificationSource& source, 176 const content::NotificationSource& source,
177 const content::NotificationDetails& details) OVERRIDE; 177 const content::NotificationDetails& details) OVERRIDE;
178 178
179 private: 179 private:
180 180
181 // Gets the list of all service names for which tokens will be retrieved. 181 // Gets the list of all service names for which tokens will be retrieved.
182 // This method is meant only for tests. 182 // This method is meant only for tests.
183 static void GetServiceNamesForTesting(std::vector<std::string>* names); 183 static void GetServiceNamesForTesting(std::vector<std::string>* names);
184 184
185 void FireCredentialUpdatedNotification(const std::string& credential_name,
186 const std::string& credential_value);
187
185 void FireTokenAvailableNotification(const std::string& service, 188 void FireTokenAvailableNotification(const std::string& service,
186 const std::string& auth_token); 189 const std::string& auth_token);
187 190
188 void FireTokenRequestFailedNotification(const std::string& service, 191 void FireTokenRequestFailedNotification(const std::string& service,
189 const GoogleServiceAuthError& error); 192 const GoogleServiceAuthError& error);
190 193
191 void LoadTokensIntoMemory( 194 void LoadTokensIntoMemory(
192 const std::map<std::string, std::string>& db_tokens, 195 const std::map<std::string, std::string>& db_tokens,
193 std::map<std::string, std::string>* in_memory_tokens); 196 std::map<std::string, std::string>* in_memory_tokens);
194 void LoadSingleTokenIntoMemory( 197 void LoadSingleTokenIntoMemory(
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 236
234 friend class TokenServiceTest; 237 friend class TokenServiceTest;
235 FRIEND_TEST_ALL_PREFIXES(TokenServiceTest, LoadTokensIntoMemoryBasic); 238 FRIEND_TEST_ALL_PREFIXES(TokenServiceTest, LoadTokensIntoMemoryBasic);
236 FRIEND_TEST_ALL_PREFIXES(TokenServiceTest, LoadTokensIntoMemoryAdvanced); 239 FRIEND_TEST_ALL_PREFIXES(TokenServiceTest, LoadTokensIntoMemoryAdvanced);
237 FRIEND_TEST_ALL_PREFIXES(TokenServiceTest, FullIntegrationNewServicesAdded); 240 FRIEND_TEST_ALL_PREFIXES(TokenServiceTest, FullIntegrationNewServicesAdded);
238 241
239 DISALLOW_COPY_AND_ASSIGN(TokenService); 242 DISALLOW_COPY_AND_ASSIGN(TokenService);
240 }; 243 };
241 244
242 #endif // CHROME_BROWSER_SIGNIN_TOKEN_SERVICE_H_ 245 #endif // CHROME_BROWSER_SIGNIN_TOKEN_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/signin/token_service.cc » ('j') | chrome/browser/signin/token_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698