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

Unified Diff: chrome/browser/sync/glue/sync_backend_host.cc

Issue 12380006: Build a new TokenCacheService so I can stop using TokenService for something it wasn't designed for. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 10 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/sync/glue/sync_backend_host.cc
diff --git a/chrome/browser/sync/glue/sync_backend_host.cc b/chrome/browser/sync/glue/sync_backend_host.cc
index e689d6d7213ce645588d2996f2a8e1f7fa7e5afd..dd33ae408bc09f53d9adb00929affaf23b3521f0 100644
--- a/chrome/browser/sync/glue/sync_backend_host.cc
+++ b/chrome/browser/sync/glue/sync_backend_host.cc
@@ -23,7 +23,6 @@
#include "build/build_config.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/signin/token_service.h"
-#include "chrome/browser/signin/token_service_factory.h"
#include "chrome/browser/sync/glue/android_invalidator_bridge.h"
#include "chrome/browser/sync/glue/android_invalidator_bridge_proxy.h"
#include "chrome/browser/sync/glue/change_processor.h"
@@ -33,6 +32,8 @@
#include "chrome/browser/sync/glue/synced_device_tracker.h"
#include "chrome/browser/sync/invalidations/invalidator_storage.h"
#include "chrome/browser/sync/sync_prefs.h"
+#include "chrome/browser/token_cache/token_cache.h"
+#include "chrome/browser/token_cache/token_cache_factory.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
@@ -1582,9 +1583,11 @@ void SyncBackendHost::NotifyUpdatedToken(const std::string& token) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
TokenAvailableDetails details(GaiaConstants::kSyncService, token);
- TokenService* token_service = TokenServiceFactory::GetForProfile(profile_);
- CHECK(token_service);
- token_service->AddAuthTokenManually(details.service(), details.token());
+ TokenCacheService* token_cache = TokenCacheServiceFactory::GetForProfile(
+ profile_);
+ CHECK(token_cache);
+ token_cache->StoreToken(GaiaConstants::kObfuscatedGaiaId, details.token(),
Andrew T Wilson (Slow) 2013/03/01 17:50:54 Should we really be writing the sync token as the
Pete Williamson 2013/03/04 18:32:53 Good catch, reverted.
+ GaiaConstants::kObfuscatedGaiaIdTimeout);
}
void SyncBackendHost::NotifyEncryptedTypesChanged(

Powered by Google App Engine
This is Rietveld 408576698