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

Unified Diff: chrome/browser/extensions/api/identity/experimental_identity_api.h

Issue 17009016: Wire up the identity API for enterprise Kiosk Apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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/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

Powered by Google App Engine
This is Rietveld 408576698