| Index: chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.cc
|
| diff --git a/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.cc b/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.cc
|
| index 35ca56d81fee14caa4a76447e5b6ec3abb4d8a02..91f65eeec8705fe806e14a745212c97437c243f2 100644
|
| --- a/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.cc
|
| +++ b/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.cc
|
| @@ -292,11 +292,11 @@ void UserCloudPolicyManagerChromeOS::FetchPolicyOAuthToken() {
|
| ->user_context()
|
| .GetRefreshToken();
|
| if (!refresh_token.empty()) {
|
| - token_fetcher_.reset(new PolicyOAuth2TokenFetcher(
|
| - std::string(), g_browser_process->system_request_context(),
|
| + token_fetcher_.reset(new PolicyOAuth2TokenFetcher());
|
| + token_fetcher_->StartWithRefreshToken(
|
| + refresh_token, g_browser_process->system_request_context(),
|
| base::Bind(&UserCloudPolicyManagerChromeOS::OnOAuth2PolicyTokenFetched,
|
| - base::Unretained(this))));
|
| - token_fetcher_->StartWithRefreshToken(refresh_token);
|
| + base::Unretained(this)));
|
| return;
|
| }
|
|
|
| @@ -309,12 +309,11 @@ void UserCloudPolicyManagerChromeOS::FetchPolicyOAuthToken() {
|
| return;
|
| }
|
|
|
| - token_fetcher_.reset(new PolicyOAuth2TokenFetcher(
|
| - signin_context.get(),
|
| - g_browser_process->system_request_context(),
|
| + token_fetcher_.reset(new PolicyOAuth2TokenFetcher());
|
| + token_fetcher_->StartWithSigninContext(
|
| + signin_context.get(), g_browser_process->system_request_context(),
|
| base::Bind(&UserCloudPolicyManagerChromeOS::OnOAuth2PolicyTokenFetched,
|
| - base::Unretained(this))));
|
| - token_fetcher_->Start();
|
| + base::Unretained(this)));
|
| }
|
|
|
| void UserCloudPolicyManagerChromeOS::OnOAuth2PolicyTokenFetched(
|
|
|