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

Unified Diff: chrome/browser/invalidation/ticl_invalidation_service.h

Issue 23382008: Making OAuth2TokenService multi-login aware, updating callers, minor fixes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updates to AndroidPO2TS and removing the DCHECK(signin_manager) from GetPrimaryAccountId Created 7 years, 4 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/invalidation/ticl_invalidation_service.h
diff --git a/chrome/browser/invalidation/ticl_invalidation_service.h b/chrome/browser/invalidation/ticl_invalidation_service.h
index a117e98e56205f9c31203dd93c1663a775568ce4..26c503926b8ca5acf4a30cb77a864f38493f8ddc 100644
--- a/chrome/browser/invalidation/ticl_invalidation_service.h
+++ b/chrome/browser/invalidation/ticl_invalidation_service.h
@@ -10,7 +10,7 @@
#include "base/timer/timer.h"
#include "chrome/browser/invalidation/invalidation_service.h"
#include "chrome/browser/invalidation/invalidator_storage.h"
-#include "chrome/browser/signin/token_service.h"
+#include "chrome/browser/signin/profile_oauth2_token_service.h"
#include "components/browser_context_keyed_service/browser_context_keyed_service.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
@@ -35,11 +35,11 @@ class TiclInvalidationService
public InvalidationService,
public content::NotificationObserver,
public OAuth2TokenService::Consumer,
+ public OAuth2TokenService::Observer,
public syncer::InvalidationHandler {
public:
TiclInvalidationService(SigninManagerBase* signin,
- TokenService* token_service,
- OAuth2TokenService* oauth2_token_service,
+ ProfileOAuth2TokenService* oauth2_token_service,
Profile* profile);
virtual ~TiclInvalidationService();
@@ -76,6 +76,10 @@ class TiclInvalidationService
const OAuth2TokenService::Request* request,
const GoogleServiceAuthError& error) OVERRIDE;
+ // OAuth2TokenService::Observer implementation
+ virtual void OnRefreshTokenAvailable(const std::string& account_id) OVERRIDE;
+ virtual void OnRefreshTokenRevoked(const std::string& account_id) OVERRIDE;
+
// syncer::InvalidationHandler implementation.
virtual void OnInvalidatorStateChange(
syncer::InvalidatorState state) OVERRIDE;
@@ -102,8 +106,7 @@ class TiclInvalidationService
Profile *const profile_;
SigninManagerBase *const signin_manager_;
- TokenService *const token_service_;
- OAuth2TokenService *const oauth2_token_service_;
+ ProfileOAuth2TokenService *const oauth2_token_service_;
scoped_ptr<syncer::InvalidatorRegistrar> invalidator_registrar_;
scoped_ptr<InvalidatorStorage> invalidator_storage_;

Powered by Google App Engine
This is Rietveld 408576698