Chromium Code Reviews| 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..67e94ea80ee53260143407e6f5b0381848ba4f74 100644 |
| --- a/chrome/browser/signin/android_profile_oauth2_token_service.h |
| +++ b/chrome/browser/signin/android_profile_oauth2_token_service.h |
| @@ -28,15 +28,9 @@ 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( |
| + const std::string& account_id) OVERRIDE; |
| - virtual bool RefreshTokenIsAvailable() OVERRIDE; |
| virtual void InvalidateToken(const ScopeSet& scopes, |
| const std::string& invalid_token) OVERRIDE; |
|
Roger Tawa OOO till Jul 10th
2013/09/13 14:53:56
I think this function needs an |account_id| arg.
fgorski
2013/09/13 22:06:46
Done. Changed to implement the virtual protected I
|
| @@ -44,6 +38,9 @@ class AndroidProfileOAuth2TokenService : public ProfileOAuth2TokenService { |
| // 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,18 +49,12 @@ 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); |
| - |
| private: |
| DISALLOW_COPY_AND_ASSIGN(AndroidProfileOAuth2TokenService); |
| }; |