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

Unified Diff: chrome/browser/extensions/api/identity/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: Stop mint queue request on completion. 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/identity/identity_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9239ed402bf7ca291878dd4d9515507833bf6eca..a04a01dce7a524d203466aba431e35e17f8735d3 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);
@@ -116,6 +119,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);
@@ -147,6 +157,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 {
« no previous file with comments | « no previous file | chrome/browser/extensions/api/identity/identity_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698