| Index: chrome/browser/managed_mode/managed_user_refresh_token_fetcher.cc
|
| diff --git a/chrome/browser/managed_mode/managed_user_refresh_token_fetcher.cc b/chrome/browser/managed_mode/managed_user_refresh_token_fetcher.cc
|
| index 4cd6258ea6312f97a3b533803e9826b3465a8fff..e265d22c61736132f7eb9bdb62301305ce947888 100644
|
| --- a/chrome/browser/managed_mode/managed_user_refresh_token_fetcher.cc
|
| +++ b/chrome/browser/managed_mode/managed_user_refresh_token_fetcher.cc
|
| @@ -52,7 +52,8 @@ class ManagedUserRefreshTokenFetcherImpl
|
| public GaiaOAuthClient::Delegate {
|
| public:
|
| ManagedUserRefreshTokenFetcherImpl(OAuth2TokenService* oauth2_token_service,
|
| - URLRequestContextGetter* context);
|
| + const std::string& account_id,
|
| + URLRequestContextGetter* context);
|
| virtual ~ManagedUserRefreshTokenFetcherImpl();
|
|
|
| // ManagedUserRefreshTokenFetcher implementation:
|
| @@ -89,6 +90,7 @@ class ManagedUserRefreshTokenFetcherImpl
|
| void DispatchGoogleServiceAuthError(const GoogleServiceAuthError& error,
|
| const std::string& token);
|
| OAuth2TokenService* oauth2_token_service_;
|
| + std::string account_id_;
|
| URLRequestContextGetter* context_;
|
|
|
| std::string device_name_;
|
| @@ -104,8 +106,10 @@ class ManagedUserRefreshTokenFetcherImpl
|
|
|
| ManagedUserRefreshTokenFetcherImpl::ManagedUserRefreshTokenFetcherImpl(
|
| OAuth2TokenService* oauth2_token_service,
|
| + const std::string& account_id,
|
| URLRequestContextGetter* context)
|
| : oauth2_token_service_(oauth2_token_service),
|
| + account_id_(account_id),
|
| context_(context),
|
| access_token_expired_(false) {}
|
|
|
| @@ -125,7 +129,8 @@ void ManagedUserRefreshTokenFetcherImpl::Start(
|
| void ManagedUserRefreshTokenFetcherImpl::StartFetching() {
|
| OAuth2TokenService::ScopeSet scopes;
|
| scopes.insert(GaiaUrls::GetInstance()->oauth1_login_scope());
|
| - access_token_request_ = oauth2_token_service_->StartRequest(scopes, this);
|
| + access_token_request_ = oauth2_token_service_->StartRequest(
|
| + account_id_, scopes, this);
|
| }
|
|
|
| void ManagedUserRefreshTokenFetcherImpl::OnGetTokenSuccess(
|
| @@ -265,9 +270,11 @@ void ManagedUserRefreshTokenFetcherImpl::DispatchGoogleServiceAuthError(
|
| // static
|
| scoped_ptr<ManagedUserRefreshTokenFetcher>
|
| ManagedUserRefreshTokenFetcher::Create(OAuth2TokenService* oauth2_token_service,
|
| + const std::string& account_id,
|
| URLRequestContextGetter* context) {
|
| scoped_ptr<ManagedUserRefreshTokenFetcher> fetcher(
|
| - new ManagedUserRefreshTokenFetcherImpl(oauth2_token_service, context));
|
| + new ManagedUserRefreshTokenFetcherImpl(oauth2_token_service, account_id,
|
| + context));
|
| return fetcher.Pass();
|
| }
|
|
|
|
|