Index: chrome/browser/extensions/api/identity/identity_api.h |
diff --git a/chrome/browser/extensions/api/identity/identity_api.h b/chrome/browser/extensions/api/identity/identity_api.h |
index a4346208a21601824630c55517511ae8a97395ae..8551c1c4632b3323000d3fb48513a577423cf1bd 100644 |
--- a/chrome/browser/extensions/api/identity/identity_api.h |
+++ b/chrome/browser/extensions/api/identity/identity_api.h |
@@ -108,6 +108,10 @@ class IdentityAPI : public BrowserContextKeyedAPI, |
const CachedTokens& GetAllCachedTokens(); |
+ // Account queries. |
+ std::vector<std::string> GetAccounts() const; |
+ |
+ // Global error reporting. |
void ReportAuthError(const GoogleServiceAuthError& error); |
GoogleServiceAuthError GetAuthStatusForTest() const; |
@@ -124,6 +128,8 @@ class IdentityAPI : public BrowserContextKeyedAPI, |
void AddShutdownObserver(ShutdownObserver* observer); |
void RemoveShutdownObserver(ShutdownObserver* observer); |
+ void SetAccountStateForTest(AccountIds ids, bool is_signed_in); |
+ |
private: |
friend class BrowserContextKeyedAPIFactory<IdentityAPI>; |
@@ -141,6 +147,20 @@ class IdentityAPI : public BrowserContextKeyedAPI, |
template <> |
void BrowserContextKeyedAPIFactory<IdentityAPI>::DeclareFactoryDependencies(); |
+class IdentityGetAccountsFunction : public ChromeUIThreadExtensionFunction { |
+ public: |
+ DECLARE_EXTENSION_FUNCTION("identity.getAccounts", |
+ IDENTITY_GETACCOUNTS); |
+ |
+ IdentityGetAccountsFunction(); |
+ |
+ private: |
+ virtual ~IdentityGetAccountsFunction(); |
+ |
+ // UIThreadExtensionFunction implementation. |
+ virtual ExtensionFunction::ResponseAction Run() OVERRIDE; |
+}; |
+ |
// identity.getAuthToken fetches an OAuth 2 function for the |
// caller. The request has three sub-flows: non-interactive, |
// interactive, and sign-in. |