Index: chrome/browser/extensions/api/identity/experimental_identity_api.h |
diff --git a/chrome/browser/extensions/api/identity/experimental_identity_api.h b/chrome/browser/extensions/api/identity/experimental_identity_api.h |
index cf165dc3e0426db9104fe489b5b7ce2a5d8db503..0a41422b4003e64df82d74b0337a87124d5e04bf 100644 |
--- a/chrome/browser/extensions/api/identity/experimental_identity_api.h |
+++ b/chrome/browser/extensions/api/identity/experimental_identity_api.h |
@@ -15,6 +15,7 @@ |
#include "chrome/browser/extensions/api/identity/identity_signin_flow.h" |
#include "chrome/browser/extensions/extension_function.h" |
#include "chrome/browser/extensions/extension_install_prompt.h" |
+#include "chrome/browser/signin/oauth2_token_service.h" |
#include "google_apis/gaia/oauth2_mint_token_flow.h" |
namespace extensions { |
@@ -44,7 +45,8 @@ class ExperimentalIdentityGetAuthTokenFunction |
: public AsyncExtensionFunction, |
public ExtensionInstallPrompt::Delegate, |
public OAuth2MintTokenFlow::Delegate, |
- public IdentitySigninFlow::Delegate { |
+ public IdentitySigninFlow::Delegate, |
+ public OAuth2TokenService::Consumer { |
Michael Courage
2013/06/20 00:19:42
chrome.experimental.identity is only around for a
Mattias Nissler (ping if slow)
2013/06/21 02:44:46
OK, reverted the experimental changes.
|
public: |
DECLARE_EXTENSION_FUNCTION("experimental.identity.getAuthToken", |
EXPERIMENTAL_IDENTITY_GETAUTHTOKEN); |
@@ -83,6 +85,13 @@ class ExperimentalIdentityGetAuthTokenFunction |
virtual void InstallUIProceed() OVERRIDE; |
virtual void InstallUIAbort(bool user_initiated) 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); |
@@ -106,6 +115,7 @@ class ExperimentalIdentityGetAuthTokenFunction |
IssueAdviceInfo issue_advice_; |
scoped_ptr<ExtensionInstallPrompt> install_ui_; |
scoped_ptr<IdentitySigninFlow> signin_flow_; |
+ scoped_ptr<OAuth2TokenService::Request> device_token_request_; |
}; |
class ExperimentalIdentityLaunchWebAuthFlowFunction |