Index: chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper_impl.cc |
diff --git a/chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper_impl.cc b/chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper_impl.cc |
index 8c18f34f2e3bbd5ff1e18d82d6950e145fcbaa85..87f19a8edd3c1e0143c5e2031d1ab84b9087568c 100644 |
--- a/chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper_impl.cc |
+++ b/chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper_impl.cc |
@@ -92,7 +92,7 @@ void EnterpriseEnrollmentHelperImpl::EnrollUsingAuthCode( |
bool fetch_additional_token) { |
DCHECK(!started_); |
started_ = true; |
- oauth_fetcher_.reset(new policy::PolicyOAuth2TokenFetcher()); |
+ oauth_fetcher_.reset(policy::PolicyOAuth2TokenFetcher::CreateInstance()); |
oauth_fetcher_->StartWithAuthCode( |
auth_code, g_browser_process->system_request_context(), |
base::Bind(&EnterpriseEnrollmentHelperImpl::OnTokenFetched, |
@@ -114,11 +114,11 @@ void EnterpriseEnrollmentHelperImpl::ClearAuth(const base::Closure& callback) { |
(new TokenRevoker())->Start(additional_token_); |
if (oauth_fetcher_) { |
- if (!oauth_fetcher_->oauth2_access_token().empty()) |
- (new TokenRevoker())->Start(oauth_fetcher_->oauth2_access_token()); |
+ if (!oauth_fetcher_->OAuth2AccessToken().empty()) |
+ (new TokenRevoker())->Start(oauth_fetcher_->OAuth2AccessToken()); |
- if (!oauth_fetcher_->oauth2_refresh_token().empty()) |
- (new TokenRevoker())->Start(oauth_fetcher_->oauth2_refresh_token()); |
+ if (!oauth_fetcher_->OAuth2RefreshToken().empty()) |
+ (new TokenRevoker())->Start(oauth_fetcher_->OAuth2RefreshToken()); |
oauth_fetcher_.reset(); |
} else if (oauth_token_.length()) { |
@@ -210,8 +210,8 @@ void EnterpriseEnrollmentHelperImpl::OnTokenFetched( |
} |
additional_token_ = token; |
- std::string refresh_token = oauth_fetcher_->oauth2_refresh_token(); |
- oauth_fetcher_.reset(new policy::PolicyOAuth2TokenFetcher()); |
+ std::string refresh_token = oauth_fetcher_->OAuth2RefreshToken(); |
+ oauth_fetcher_.reset(policy::PolicyOAuth2TokenFetcher::CreateInstance()); |
oauth_fetcher_->StartWithRefreshToken( |
refresh_token, g_browser_process->system_request_context(), |
base::Bind(&EnterpriseEnrollmentHelperImpl::OnTokenFetched, |