Commit 68d8c456 authored by noms@chromium.org's avatar noms@chromium.org

[Mac] Check for guest mode correctly before opening the user manager.

BUG=NONE
TBR=asvitkine@chromium.org
TEST=With the --new-profile-management flag, start Chrome. Select
"Browse as guest" from the avatar menu. From the guest browser, select
"View all people" from the avatar menu. This shouldn't crash and should
show the User Manager.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243710 0039d316-1c4b-4281-b951-d872f2087c98
parent 36ec24fc
......@@ -212,8 +212,7 @@ class ActiveProfileObserverBridge : public AvatarMenuObserver,
- (IBAction)showUserManager:(id)sender {
// Only non-guest users appear in the User Manager.
base::FilePath profile_path;
// The button tag indicates whether the active profile is a non-guest profile.
if ([sender tag]) {
if (!isGuestSession_) {
size_t active_index = avatarMenu_->GetActiveProfileIndex();
profile_path = avatarMenu_->GetItemAt(active_index).profile_path;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment