| 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 b2b85c359df7c084cc8ac395a7e9c05d99fafc93..67ae2b7722d5eeeb28cf051c3b39577cad61b018 100644
|
| --- a/chrome/browser/extensions/api/identity/identity_api.h
|
| +++ b/chrome/browser/extensions/api/identity/identity_api.h
|
| @@ -19,10 +19,12 @@
|
| #include "chrome/browser/extensions/api/identity/web_auth_flow.h"
|
| #include "chrome/browser/extensions/api/profile_keyed_api_factory.h"
|
| #include "chrome/browser/extensions/extension_function.h"
|
| +#include "chrome/browser/signin/oauth2_token_service.h"
|
| #include "chrome/browser/signin/signin_global_error.h"
|
| #include "google_apis/gaia/oauth2_mint_token_flow.h"
|
|
|
| class GoogleServiceAuthError;
|
| +class MockGetAuthTokenFunction;
|
| class Profile;
|
| class SigninManagerBase;
|
|
|
| @@ -65,7 +67,8 @@ class IdentityGetAuthTokenFunction : public AsyncExtensionFunction,
|
| public GaiaWebAuthFlow::Delegate,
|
| public IdentityMintRequestQueue::Request,
|
| public OAuth2MintTokenFlow::Delegate,
|
| - public IdentitySigninFlow::Delegate {
|
| + public IdentitySigninFlow::Delegate,
|
| + public OAuth2TokenService::Consumer {
|
| public:
|
| DECLARE_EXTENSION_FUNCTION("identity.getAuthToken",
|
| EXPERIMENTAL_IDENTITY_GETAUTHTOKEN);
|
| @@ -113,6 +116,13 @@ class IdentityGetAuthTokenFunction : public AsyncExtensionFunction,
|
| virtual void OnGaiaFlowCompleted(const std::string& access_token,
|
| const std::string& expiration) OVERRIDE;
|
|
|
| + // OAuth2TokenService::Consumer implementation:
|
| + virtual void OnGetTokenSuccess(const OAuth2TokenService::Request* request,
|
| + const std::string& access_token,
|
| + const base::Time& expiration_time) OVERRIDE;
|
| + virtual void OnGetTokenFailure(const OAuth2TokenService::Request* request,
|
| + const GoogleServiceAuthError& error) OVERRIDE;
|
| +
|
| // Starts a mint token request to GAIA.
|
| void StartGaiaRequest(OAuth2MintTokenFlow::Mode mode);
|
|
|
| @@ -141,6 +151,7 @@ class IdentityGetAuthTokenFunction : public AsyncExtensionFunction,
|
| IssueAdviceInfo issue_advice_;
|
| scoped_ptr<GaiaWebAuthFlow> gaia_web_auth_flow_;
|
| scoped_ptr<IdentitySigninFlow> signin_flow_;
|
| + scoped_ptr<OAuth2TokenService::Request> device_token_request_;
|
| };
|
|
|
| class IdentityRemoveCachedAuthTokenFunction : public SyncExtensionFunction {
|
|
|