[Mac] Fix DCHECK in rebuilding the menu bar items when deleting the active profile
commit0ce35f14fd329b55f2eb43bf1801f447f26e3d7d
authornoms <noms@chromium.org>
Fri, 3 Oct 2014 19:25:58 +0000 (3 12:25 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 3 Oct 2014 19:26:43 +0000 (3 19:26 +0000)
tree0cf6b33d43f5b3a7efb204d90e19fdaf841570e7
parent37af8c703a8183520172fdcdd3bb88cb6a876f27
[Mac] Fix DCHECK in rebuilding the menu bar items when deleting the active profile

The DCHECK actually comes from AvatarMenu::GetActiveProfileIndex() which returns an
invalid number, as the profile is no longer in the ProfileInfoCache.

BUG=419464
TEST=Start Chrome. Open a profile, and create a second profile and open many browser windows for it. Delete this active profile. Nothing should DCHECK.

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

Cr-Commit-Position: refs/heads/master@{#298076}
chrome/browser/ui/cocoa/profiles/profile_menu_controller.h
chrome/browser/ui/cocoa/profiles/profile_menu_controller.mm