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); |
} |