summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/api/identity/identity_api.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/extensions/api/identity/identity_api.h')
-rw-r--r--chrome/browser/extensions/api/identity/identity_api.h21
1 files changed, 10 insertions, 11 deletions
diff --git a/chrome/browser/extensions/api/identity/identity_api.h b/chrome/browser/extensions/api/identity/identity_api.h
index e37c603..a9a7746 100644
--- a/chrome/browser/extensions/api/identity/identity_api.h
+++ b/chrome/browser/extensions/api/identity/identity_api.h
@@ -13,7 +13,9 @@
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
+#include "chrome/browser/extensions/api/identity/account_tracker.h"
#include "chrome/browser/extensions/api/identity/gaia_web_auth_flow.h"
+#include "chrome/browser/extensions/api/identity/identity_event_router.h"
#include "chrome/browser/extensions/api/identity/identity_mint_queue.h"
#include "chrome/browser/extensions/api/identity/identity_signin_flow.h"
#include "chrome/browser/extensions/api/identity/web_auth_flow.h"
@@ -239,8 +241,7 @@ class IdentityTokenCacheValue {
};
class IdentityAPI : public ProfileKeyedAPI,
- public SigninGlobalError::AuthStatusProvider,
- public OAuth2TokenService::Observer {
+ public AccountTracker::Observer {
public:
struct TokenCacheKey {
TokenCacheKey(const std::string& extension_id,
@@ -255,7 +256,6 @@ class IdentityAPI : public ProfileKeyedAPI,
explicit IdentityAPI(Profile* profile);
virtual ~IdentityAPI();
- void Initialize();
// Request serialization queue for getAuthToken.
IdentityMintRequestQueue* mint_queue();
@@ -278,12 +278,11 @@ class IdentityAPI : public ProfileKeyedAPI,
virtual void Shutdown() OVERRIDE;
static ProfileKeyedAPIFactory<IdentityAPI>* GetFactoryInstance();
- // AuthStatusProvider implementation.
- virtual std::string GetAccountId() const OVERRIDE;
- virtual GoogleServiceAuthError GetAuthStatus() const OVERRIDE;
-
- // OAuth2TokenService::Observer implementation:
- virtual void OnRefreshTokenAvailable(const std::string& account_id) OVERRIDE;
+ // AccountTracker::Observer implementation:
+ virtual void OnAccountAdded(const AccountIds& ids) OVERRIDE;
+ virtual void OnAccountRemoved(const AccountIds& ids) OVERRIDE;
+ virtual void OnAccountSignInChanged(const AccountIds& ids, bool is_signed_in)
+ OVERRIDE;
private:
friend class ProfileKeyedAPIFactory<IdentityAPI>;
@@ -295,10 +294,10 @@ class IdentityAPI : public ProfileKeyedAPI,
static const bool kServiceIsNULLWhileTesting = true;
Profile* profile_;
- GoogleServiceAuthError error_;
- bool initialized_;
IdentityMintRequestQueue mint_queue_;
CachedTokens token_cache_;
+ AccountTracker account_tracker_;
+ IdentityEventRouter identity_event_router_;
};
template <>