| Index: components/signin/ios/browser/profile_oauth2_token_service_ios.h
|
| diff --git a/components/signin/ios/browser/profile_oauth2_token_service_ios.h b/components/signin/ios/browser/profile_oauth2_token_service_ios.h
|
| index b1f37529de0c2f57760938465c22007410c0c0ee..3355f41b75459858bdf43cd7518a823607ad1cdb 100644
|
| --- a/components/signin/ios/browser/profile_oauth2_token_service_ios.h
|
| +++ b/components/signin/ios/browser/profile_oauth2_token_service_ios.h
|
| @@ -8,7 +8,7 @@
|
| #include <string>
|
|
|
| #include "base/threading/thread_checker.h"
|
| -#include "components/signin/core/browser/mutable_profile_oauth2_token_service.h"
|
| +#include "components/signin/core/browser/profile_oauth2_token_service.h"
|
|
|
| class OAuth2AccessTokenFetcher;
|
|
|
| @@ -24,11 +24,8 @@ class ProfileOAuth2TokenServiceIOSProvider;
|
| //
|
| // Note: Requests should be started from the UI thread. To start a
|
| // request from aother thread, please use OAuth2TokenServiceRequest.
|
| -class ProfileOAuth2TokenServiceIOS : public MutableProfileOAuth2TokenService {
|
| +class ProfileOAuth2TokenServiceIOS : public ProfileOAuth2TokenService {
|
| public:
|
| - ProfileOAuth2TokenServiceIOS();
|
| - virtual ~ProfileOAuth2TokenServiceIOS();
|
| -
|
| // KeyedService
|
| virtual void Shutdown() OVERRIDE;
|
|
|
| @@ -57,36 +54,18 @@ class ProfileOAuth2TokenServiceIOS : public MutableProfileOAuth2TokenService {
|
| // Subsequent calls to |RefreshTokenIsAvailable| will return |false|.
|
| virtual void RevokeAllCredentials() OVERRIDE;
|
|
|
| - // Returns the refresh token for |account_id| .
|
| - // Must only be called when |ShouldUseIOSSharedAuthentication| returns false.
|
| - std::string GetRefreshTokenWhenNotUsingSharedAuthentication(
|
| - const std::string& account_id);
|
| -
|
| // Reloads accounts from the provider. Fires |OnRefreshTokenAvailable| for
|
| // each new account. Fires |OnRefreshTokenRevoked| for each account that was
|
| // removed.
|
| void ReloadCredentials();
|
|
|
| - // Upgrades to using shared authentication token service.
|
| - //
|
| - // Note: If this |ProfileOAuth2TokenServiceIOS| was using the legacy token
|
| - // service, then this call also revokes all tokens from the parent
|
| - // |MutableProfileOAuth2TokenService|.
|
| - void StartUsingSharedAuthentication();
|
| -
|
| - // Sets |use_legacy_token_service_| to |use_legacy_token_service|.
|
| - //
|
| - // Should only be called for testing.
|
| - void SetUseLegacyTokenServiceForTesting(bool use_legacy_token_service);
|
| -
|
| - // Revokes the OAuth2 refresh tokens for all accounts from the parent
|
| - // |MutableProfileOAuth2TokenService|.
|
| - //
|
| - // Note: This method should only be called if the legacy pre-SSOAuth token
|
| - // service is used.
|
| - void ForceInvalidGrantResponses();
|
| -
|
| protected:
|
| + friend class ProfileOAuth2TokenServiceFactory;
|
| + friend class ProfileOAuth2TokenServiceIOSTest;
|
| +
|
| + ProfileOAuth2TokenServiceIOS();
|
| + virtual ~ProfileOAuth2TokenServiceIOS();
|
| +
|
| virtual OAuth2AccessTokenFetcher* CreateAccessTokenFetcher(
|
| const std::string& account_id,
|
| net::URLRequestContextGetter* getter,
|
| @@ -129,10 +108,6 @@ class ProfileOAuth2TokenServiceIOS : public MutableProfileOAuth2TokenService {
|
| // to information about the account.
|
| typedef std::map<std::string, linked_ptr<AccountInfo> > AccountInfoMap;
|
|
|
| - // MutableProfileOAuth2TokenService
|
| - virtual std::string GetRefreshToken(
|
| - const std::string& account_id) const OVERRIDE;
|
| -
|
| // Returns the iOS provider;
|
| ios::ProfileOAuth2TokenServiceIOSProvider* GetProvider();
|
|
|
| @@ -140,23 +115,10 @@ class ProfileOAuth2TokenServiceIOS : public MutableProfileOAuth2TokenService {
|
| AccountInfoMap accounts_;
|
|
|
| // Calls to this class are expected to be made from the browser UI thread.
|
| - // The purpose of this this checker is to warn us if the upstream usage of
|
| - // ProfileOAuth2TokenService ever gets changed to have it be used across
|
| - // multiple threads.
|
| + // The purpose of this checker is to detect access to
|
| + // ProfileOAuth2TokenService from multiple threads in upstream code.
|
| base::ThreadChecker thread_checker_;
|
|
|
| - // Whether to use the legacy pre-SSOAuth token service.
|
| - //
|
| - // |use_legacy_token_service_| is true iff the provider is not using shared
|
| - // authentication during |LoadCredentials|. Note that |LoadCredentials| is
|
| - // called exactly once after the PO2TS initialization iff the user is signed
|
| - // in.
|
| - //
|
| - // If |use_legacy_token_service_| is true, then this
|
| - // |ProfileOAuth2TokenServiceIOS| delegates all calls to the parent
|
| - // |MutableProfileOAuth2TokenService|.
|
| - bool use_legacy_token_service_;
|
| -
|
| DISALLOW_COPY_AND_ASSIGN(ProfileOAuth2TokenServiceIOS);
|
| };
|
|
|
|
|