Chromium Code Reviews| Index: chrome/browser/signin/profile_oauth2_token_service.cc |
| diff --git a/chrome/browser/signin/profile_oauth2_token_service.cc b/chrome/browser/signin/profile_oauth2_token_service.cc |
| index 1687b33ef6c8e637b13d75deb8c981d0331e215b..3b617c14d110ac3c50e196d02525fbcfbb83fd14 100644 |
| --- a/chrome/browser/signin/profile_oauth2_token_service.cc |
| +++ b/chrome/browser/signin/profile_oauth2_token_service.cc |
| @@ -122,6 +122,14 @@ void ProfileOAuth2TokenService::UpdateAuthError( |
| if (error.state() != last_auth_error_.state()) { |
| last_auth_error_ = error; |
| signin_global_error_->AuthStatusChanged(); |
| + |
| + if (last_auth_error_.state() == |
| + GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS) { |
| + TokenService* token_service = |
| + TokenServiceFactory::GetForProfile(profile_); |
| + token_service->ClearOAuth2Credentials(); |
| + DCHECK(!token_service->HasOAuthLoginToken()); |
| + } |
|
fgorski
2013/08/29 22:31:12
You should call RevokeCredentials for the respecti
Roger Tawa OOO till Jul 10th
2013/08/30 02:25:14
Yeah totally makes sense. Done.
|
| } |
| } |