Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2953)

Unified Diff: chrome/browser/signin/profile_oauth2_token_service.cc

Issue 19567004: Convert SigninTracker to use OAuth2TokenService notifications (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Speculative fix for bad refresh token Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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.
}
}

Powered by Google App Engine
This is Rietveld 408576698