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

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

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: CR Feedback 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
« no previous file with comments | « no previous file | chrome/browser/sync/credential_cache_service_factory_win.h » ('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) 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 #include "chrome/browser/signin/token_service.h" 5 #include "chrome/browser/signin/token_service.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "chrome/browser/prefs/pref_service.h" 10 #include "chrome/browser/prefs/pref_service.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 116 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
117 credentials_ = credentials; 117 credentials_ = credentials;
118 118
119 SaveAuthTokenToDB(GaiaConstants::kGaiaLsid, credentials.lsid); 119 SaveAuthTokenToDB(GaiaConstants::kGaiaLsid, credentials.lsid);
120 SaveAuthTokenToDB(GaiaConstants::kGaiaSid, credentials.sid); 120 SaveAuthTokenToDB(GaiaConstants::kGaiaSid, credentials.sid);
121 121
122 // Cancel any currently running requests. 122 // Cancel any currently running requests.
123 for (size_t i = 0; i < arraysize(kServices); i++) { 123 for (size_t i = 0; i < arraysize(kServices); i++) {
124 fetchers_[i].reset(); 124 fetchers_[i].reset();
125 } 125 }
126
127 // Notify the CredentialCacheService that a new lsid and sid are available.
Raghu Simha 2012/07/21 01:15:46 FYI: This code is causing failures in the TokenSer
Raghu Simha 2012/07/21 02:00:55 Fixed in Patch set 5.
128 FireTokenAvailableNotification(GaiaConstants::kGaiaLsid, credentials.lsid);
129 FireTokenAvailableNotification(GaiaConstants::kGaiaSid, credentials.sid);
126 } 130 }
127 131
128 void TokenService::UpdateCredentialsWithOAuth2( 132 void TokenService::UpdateCredentialsWithOAuth2(
129 const GaiaAuthConsumer::ClientOAuthResult& credentials) { 133 const GaiaAuthConsumer::ClientOAuthResult& credentials) {
130 // Will be implemented once the ClientOAuth signin is complete. Not called 134 // Will be implemented once the ClientOAuth signin is complete. Not called
131 // yet by any code. 135 // yet by any code.
132 NOTREACHED(); 136 NOTREACHED();
133 } 137 }
134 138
135 139
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 } 392 }
389 393
390 void TokenService::Observe(int type, 394 void TokenService::Observe(int type,
391 const content::NotificationSource& source, 395 const content::NotificationSource& source,
392 const content::NotificationDetails& details) { 396 const content::NotificationDetails& details) {
393 DCHECK_EQ(type, chrome::NOTIFICATION_TOKEN_UPDATED); 397 DCHECK_EQ(type, chrome::NOTIFICATION_TOKEN_UPDATED);
394 TokenAvailableDetails* tok_details = 398 TokenAvailableDetails* tok_details =
395 content::Details<TokenAvailableDetails>(details).ptr(); 399 content::Details<TokenAvailableDetails>(details).ptr();
396 OnIssueAuthTokenSuccess(tok_details->service(), tok_details->token()); 400 OnIssueAuthTokenSuccess(tok_details->service(), tok_details->token());
397 } 401 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/credential_cache_service_factory_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698