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

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

Issue 138603002: Merge r245242: Gracefully handle being signed out of a supervised profile. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1700/src
Patch Set: Created 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b09138700815f64c9b1ea75d525b5220d74b2540..49d1fb2290fa36072e51330a9b90ada271879752 100644
--- a/chrome/browser/signin/profile_oauth2_token_service.cc
+++ b/chrome/browser/signin/profile_oauth2_token_service.cc
@@ -146,7 +146,13 @@ void ProfileOAuth2TokenService::UpdateAuthError(
if (error.state() == GoogleServiceAuthError::CONNECTION_FAILED)
return;
- DCHECK_GT(refresh_tokens_.count(account_id), 0u);
+ if (refresh_tokens_.count(account_id) == 0) {
+ // This could happen if the preferences have been corrupted (see
+ // http://crbug.com/321370). In a Debug build that would be a bug, but in a
+ // Release build we want to deal with it gracefully.
+ NOTREACHED();
+ return;
+ }
refresh_tokens_[account_id]->SetLastAuthError(error);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698