| Index: chrome/browser/signin/token_service.cc
|
| diff --git a/chrome/browser/signin/token_service.cc b/chrome/browser/signin/token_service.cc
|
| index 0e6e601ff77ca2c8deb261b8d443c966cd6763f7..1ffd2a919c0e8c1f701f01717f752ec8f254b45b 100644
|
| --- a/chrome/browser/signin/token_service.cc
|
| +++ b/chrome/browser/signin/token_service.cc
|
| @@ -162,10 +162,8 @@ void TokenService::UpdateCredentials(
|
| }
|
|
|
| void TokenService::UpdateCredentialsWithOAuth2(
|
| - const GaiaAuthConsumer::ClientOAuthResult& credentials) {
|
| - // Will be implemented once the ClientOAuth signin is complete. Not called
|
| - // yet by any code.
|
| - NOTREACHED();
|
| + const GaiaAuthConsumer::ClientOAuthResult& oauth2_tokens) {
|
| + SaveOAuth2Credentials(oauth2_tokens);
|
| }
|
|
|
| void TokenService::LoadTokensFromDB() {
|
| @@ -343,6 +341,10 @@ void TokenService::OnIssueAuthTokenFailure(const std::string& service,
|
| void TokenService::OnClientOAuthSuccess(const ClientOAuthResult& result) {
|
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| VLOG(1) << "Got OAuth2 login token pair";
|
| + SaveOAuth2Credentials(result);
|
| +}
|
| +
|
| +void TokenService::SaveOAuth2Credentials(const ClientOAuthResult& result) {
|
| token_map_[GaiaConstants::kGaiaOAuth2LoginRefreshToken] =
|
| result.refresh_token;
|
| token_map_[GaiaConstants::kGaiaOAuth2LoginAccessToken] = result.access_token;
|
|
|