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

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

Issue 138243004: Gracefully handle being signed out of a supervised profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/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/mutable_profile_oauth2_token_service.cc
diff --git a/chrome/browser/signin/mutable_profile_oauth2_token_service.cc b/chrome/browser/signin/mutable_profile_oauth2_token_service.cc
index 120aceed9547e82f0d9fac9a2f9287869b851aec..4c525c6ffc1a0fbc63424069a6674885c959aa2a 100644
--- a/chrome/browser/signin/mutable_profile_oauth2_token_service.cc
+++ b/chrome/browser/signin/mutable_profile_oauth2_token_service.cc
@@ -249,7 +249,13 @@ void MutableProfileOAuth2TokenService::UpdateAuthError(
}
#endif
- 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