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

Unified 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: Fix unit tests 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/signin/token_service.cc
diff --git a/chrome/browser/signin/token_service.cc b/chrome/browser/signin/token_service.cc
index 77345280f4942e8726866cc90be24d43d4a544c6..bf0bcd7cc17c9cf848b791b4fb1cb66c0b8a4477 100644
--- a/chrome/browser/signin/token_service.cc
+++ b/chrome/browser/signin/token_service.cc
@@ -253,6 +253,18 @@ void TokenService::FireTokenRequestFailedNotification(
content::Details<const TokenRequestFailedDetails>(&details));
}
+void TokenService::SaveCachedSyncTokenToDB(const std::string& sync_token) {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ VLOG(1) << "Got an authorization token for sync.";
+ token_map_[GaiaConstants::kSyncService] = sync_token;
+ SaveAuthTokenToDB(GaiaConstants::kSyncService, sync_token);
+ TokenAvailableDetails details(GaiaConstants::kSyncService, sync_token);
+ content::NotificationService::current()->Notify(
+ chrome::NOTIFICATION_TOKEN_AVAILABLE,
+ content::Source<TokenService>(this),
+ content::Details<const TokenAvailableDetails>(&details));
+}
+
void TokenService::IssueAuthTokenForTest(const std::string& service,
const std::string& auth_token) {
token_map_[service] = auth_token;

Powered by Google App Engine
This is Rietveld 408576698