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

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

Issue 293063002: Multiple account support in chrome.identity.getAuthToken (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use full name of enable-new-profile-management Created 6 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/identity_api.h
diff --git a/chrome/browser/extensions/api/identity/identity_api.h b/chrome/browser/extensions/api/identity/identity_api.h
index 8551c1c4632b3323000d3fb48513a577423cf1bd..351aad954126b45c9cbd2d0a5ca4d1ded240a62d 100644
--- a/chrome/browser/extensions/api/identity/identity_api.h
+++ b/chrome/browser/extensions/api/identity/identity_api.h
@@ -110,6 +110,7 @@ class IdentityAPI : public BrowserContextKeyedAPI,
// Account queries.
std::vector<std::string> GetAccounts() const;
+ std::string FindAccountKeyByGaiaId(const std::string& gaia_id);
// Global error reporting.
void ReportAuthError(const GoogleServiceAuthError& error);
@@ -194,6 +195,26 @@ class IdentityGetAuthTokenFunction : public ChromeAsyncExtensionFunction,
protected:
virtual ~IdentityGetAuthTokenFunction();
+ // IdentitySigninFlow::Delegate implementation:
+ virtual void SigninSuccess() OVERRIDE;
+ virtual void SigninFailed() OVERRIDE;
+
+ // GaiaWebAuthFlow::Delegate implementation:
+ virtual void OnGaiaFlowFailure(GaiaWebAuthFlow::Failure failure,
+ GoogleServiceAuthError service_error,
+ const std::string& oauth_error) OVERRIDE;
+ 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;
+
+ scoped_ptr<OAuth2TokenService::Request> login_token_request_;
+
private:
FRIEND_TEST_ALL_PREFIXES(GetAuthTokenFunctionTest,
ComponentWithChromeClientId);
@@ -228,24 +249,6 @@ class IdentityGetAuthTokenFunction : public ChromeAsyncExtensionFunction,
virtual void OnIssueAdviceSuccess(
const IssueAdviceInfo& issue_advice) OVERRIDE;
- // IdentitySigninFlow::Delegate implementation:
- virtual void SigninSuccess() OVERRIDE;
- virtual void SigninFailed() OVERRIDE;
-
- // GaiaWebAuthFlow::Delegate implementation:
- virtual void OnGaiaFlowFailure(GaiaWebAuthFlow::Failure failure,
- GoogleServiceAuthError service_error,
- const std::string& oauth_error) OVERRIDE;
- 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;
-
// IdentityAPI::ShutdownObserver implementation:
virtual void OnShutdown() OVERRIDE;
@@ -290,7 +293,6 @@ class IdentityGetAuthTokenFunction : public ChromeAsyncExtensionFunction,
IssueAdviceInfo issue_advice_;
scoped_ptr<GaiaWebAuthFlow> gaia_web_auth_flow_;
scoped_ptr<IdentitySigninFlow> signin_flow_;
- scoped_ptr<OAuth2TokenService::Request> login_token_request_;
};
class IdentityRemoveCachedAuthTokenFunction

Powered by Google App Engine
This is Rietveld 408576698