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

Unified Diff: chrome/browser/services/gcm/gcm_account_tracker.cc

Issue 878713002: Fix to the GCM Account Tracker flooding on a stale refresh token (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/services/gcm/gcm_account_tracker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/services/gcm/gcm_account_tracker.cc
diff --git a/chrome/browser/services/gcm/gcm_account_tracker.cc b/chrome/browser/services/gcm/gcm_account_tracker.cc
index 05216887c65a04b14848cf1994f295e8bed7e3b3..22dd5b526f19ee6967cec3ee7aebda83bb2c65a9 100644
--- a/chrome/browser/services/gcm/gcm_account_tracker.cc
+++ b/chrome/browser/services/gcm/gcm_account_tracker.cc
@@ -150,8 +150,13 @@ void GCMAccountTracker::OnGetTokenFailure(
iter->second.state == ACCOUNT_REMOVED);
// If OnAccountSignedOut(..) was called most recently, account is kept in
// ACCOUNT_REMOVED state.
- if (iter->second.state == GETTING_TOKEN)
- iter->second.state = TOKEN_NEEDED;
+ if (iter->second.state == GETTING_TOKEN) {
+ // Given the fetcher has a built in retry logic, consider this situation
+ // to be invalid refresh token, that is only fixed when user signs in.
+ // Once the users signs in properly the minting will retry.
+ iter->second.access_token.clear();
+ iter->second.state = ACCOUNT_REMOVED;
+ }
}
DeleteTokenRequest(request);
« no previous file with comments | « no previous file | chrome/browser/services/gcm/gcm_account_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698