| Index: chrome/browser/ui/cocoa/browser/profile_chooser_controller.mm
|
| diff --git a/chrome/browser/ui/cocoa/browser/profile_chooser_controller.mm b/chrome/browser/ui/cocoa/browser/profile_chooser_controller.mm
|
| index 386db324f2a4d0f8e46036bdcfbc1c26d67d6365..7ebf8c529eda41b2b23eca15cd5d46782e788f94 100644
|
| --- a/chrome/browser/ui/cocoa/browser/profile_chooser_controller.mm
|
| +++ b/chrome/browser/ui/cocoa/browser/profile_chooser_controller.mm
|
| @@ -15,6 +15,7 @@
|
| #include "chrome/browser/profiles/profile_manager.h"
|
| #include "chrome/browser/profiles/profile_window.h"
|
| #include "chrome/browser/ui/browser.h"
|
| +#include "chrome/browser/ui/browser_dialogs.h"
|
| #include "chrome/browser/ui/browser_window.h"
|
| #import "chrome/browser/ui/cocoa/info_bubble_view.h"
|
| #import "chrome/browser/ui/cocoa/info_bubble_window.h"
|
| @@ -103,9 +104,14 @@ void SetWindowSize(NSWindow* window, NSSize size) {
|
| }
|
|
|
| - (IBAction)showUserManager:(id)sender {
|
| - // TODO(noms): This should use chrome::ShowUserManager() when the
|
| - // implementation is ready.
|
| - chrome::ShowSingletonTab(browser_, GURL(chrome::kChromeUIUserManagerURL));
|
| + // 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]) {
|
| + size_t active_index = avatarMenu_->GetActiveProfileIndex();
|
| + profile_path = avatarMenu_->GetItemAt(active_index).profile_path;
|
| + }
|
| + chrome::ShowUserManager(profile_path);
|
| }
|
|
|
| - (IBAction)switchToGuestProfile:(id)sender {
|
| @@ -147,6 +153,9 @@ void SetWindowSize(NSWindow* window, NSSize size) {
|
| NSView* currentProfileView = nil;
|
| base::scoped_nsobject<NSMutableArray> otherProfiles(
|
| [[NSMutableArray alloc] init]);
|
| +
|
| + // By default, assume the active profile is a guest, and change this
|
| + // if an active profile is discovered.
|
| BOOL isGuestView = YES;
|
|
|
| for (size_t i = 0; i < avatarMenu_->GetNumberOfItems(); ++i) {
|
| @@ -286,6 +295,7 @@ void SetWindowSize(NSWindow* window, NSSize size) {
|
| withTextResourceId:IDS_PROFILES_ALL_PEOPLE_BUTTON
|
| withResourceId:IDR_ICON_PROFILES_ADD_USER];
|
| [allUsersButton setTarget:self];
|
| + [allUsersButton setTag:!isGuestView];
|
| [allUsersButton setAction:@selector(showUserManager:)];
|
| yOffset = NSMaxY([allUsersButton frame]) + kSmallVerticalSpacing;
|
|
|
|
|