Skip to content

Commit

Permalink
Gracefully handle being signed out of a supervised profile.
Browse files Browse the repository at this point in the history
This is not something that would happen under normal circumstances, but it may happen if the preferences become corrupted or are modified.

BUG=321370

Review URL: https://codereview.chromium.org/138243004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245242 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
bauerb@chromium.org committed Jan 16, 2014
1 parent 8555e7f commit 7f0dd7f
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,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);
}

Expand Down

0 comments on commit 7f0dd7f

Please sign in to comment.