| Index: chrome/browser/ui/cocoa/profiles/avatar_base_controller.mm
|
| diff --git a/chrome/browser/ui/cocoa/profiles/avatar_base_controller.mm b/chrome/browser/ui/cocoa/profiles/avatar_base_controller.mm
|
| index e1b9ad10616915abbac391c296f85f1856ca90da..acc4b17d9bf595355a53b9ab96df0194712d99af 100644
|
| --- a/chrome/browser/ui/cocoa/profiles/avatar_base_controller.mm
|
| +++ b/chrome/browser/ui/cocoa/profiles/avatar_base_controller.mm
|
| @@ -4,6 +4,7 @@
|
|
|
| #import "chrome/browser/ui/cocoa/profiles/avatar_base_controller.h"
|
|
|
| +#include "base/mac/foundation_util.h"
|
| #include "chrome/app/chrome_command_ids.h"
|
| #include "chrome/browser/browser_process.h"
|
| #include "chrome/browser/profiles/profile_info_cache_observer.h"
|
| @@ -141,8 +142,22 @@ class ProfileInfoUpdateObserver : public ProfileInfoCacheObserver,
|
| - (void)showAvatarBubble:(NSView*)anchor
|
| withMode:(BrowserWindow::AvatarBubbleMode)mode
|
| withServiceType:(signin::GAIAServiceType)serviceType {
|
| - if (menuController_)
|
| + if (menuController_) {
|
| + if (switches::IsNewAvatarMenu()) {
|
| + profiles::BubbleViewMode viewMode;
|
| + profiles::TutorialMode tutorialMode;
|
| + profiles::BubbleViewModeFromAvatarBubbleMode(
|
| + mode, &viewMode, &tutorialMode);
|
| + if (tutorialMode != profiles::TUTORIAL_MODE_NONE) {
|
| + ProfileChooserController* profileChooserController =
|
| + base::mac::ObjCCastStrict<ProfileChooserController>(
|
| + menuController_);
|
| + [profileChooserController setTutorialMode:tutorialMode];
|
| + [profileChooserController initMenuContentsWithView:viewMode];
|
| + }
|
| + }
|
| return;
|
| + }
|
|
|
| DCHECK(chrome::IsCommandEnabled(browser_, IDC_SHOW_AVATAR_MENU));
|
|
|
|
|