Index: chrome/browser/signin/android_profile_oauth2_token_service.h |
diff --git a/chrome/browser/signin/android_profile_oauth2_token_service.h b/chrome/browser/signin/android_profile_oauth2_token_service.h |
index 00575408905fea144237fe67427c1abc463d4566..6c4437797c9e9b8aa10f7d1721cdd0c64104b8d1 100644 |
--- a/chrome/browser/signin/android_profile_oauth2_token_service.h |
+++ b/chrome/browser/signin/android_profile_oauth2_token_service.h |
@@ -28,22 +28,16 @@ class TokenService; |
// request from other thread, please use ProfileOAuth2TokenServiceRequest. |
class AndroidProfileOAuth2TokenService : public ProfileOAuth2TokenService { |
public: |
- // StartRequest() fetches a token for the currently signed-in account; this |
- // version uses the account corresponding to |username|. This allows fetching |
- // tokens before a user is signed-in (e.g. during the sign-in flow). |
- scoped_ptr<OAuth2TokenService::Request> StartRequestForUsername( |
- const std::string& username, |
- const OAuth2TokenService::ScopeSet& scopes, |
- OAuth2TokenService::Consumer* consumer); |
- |
- virtual bool RefreshTokenIsAvailable() OVERRIDE; |
- virtual void InvalidateToken(const ScopeSet& scopes, |
- const std::string& invalid_token) OVERRIDE; |
+ virtual bool RefreshTokenIsAvailable( |
+ const std::string& account_id) OVERRIDE; |
// Registers the AndroidProfileOAuth2TokenService's native methods through |
// JNI. |
static bool Register(JNIEnv* env); |
+ // Lists account IDs of all accounts with a refresh token. |
+ virtual std::vector<std::string> GetAccounts() OVERRIDE; |
+ |
protected: |
friend class ProfileOAuth2TokenServiceFactory; |
AndroidProfileOAuth2TokenService(); |
@@ -52,17 +46,18 @@ class AndroidProfileOAuth2TokenService : public ProfileOAuth2TokenService { |
// Overridden from OAuth2TokenService to intercept token fetch requests and |
// redirect them to the Account Manager. |
virtual void FetchOAuth2Token(RequestImpl* request, |
+ const std::string& account_id, |
net::URLRequestContextGetter* getter, |
const std::string& client_id, |
const std::string& client_secret, |
const ScopeSet& scopes) OVERRIDE; |
- // Low-level helper function used by both FetchOAuth2Token and |
- // StartRequestForUsername to fetch tokens. virtual to enable mocks. |
- virtual void FetchOAuth2TokenWithUsername( |
- RequestImpl* request, |
- const std::string& username, |
- const ScopeSet& scope); |
+ // Overridden from OAuth2TokenService to intercept token fetch requests and |
+ // redirect them to the Account Manager. |
+ virtual void InvalidateOAuth2Token(const std::string& account_id, |
+ const std::string& client_id, |
+ const ScopeSet& scopes, |
+ const std::string& access_token) OVERRIDE; |
private: |
DISALLOW_COPY_AND_ASSIGN(AndroidProfileOAuth2TokenService); |