Index: chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller.mm |
diff --git a/chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller.mm b/chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller.mm |
index 338e398ebab412505688fab2de6c823f52fca86b..b6e3046cd2cd35661b1eaf089f271f2e886d7c47 100644 |
--- a/chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller.mm |
+++ b/chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller.mm |
@@ -128,17 +128,21 @@ const CGFloat kLabelInset = 49.0; |
// into the xib, and this gives a little more space to visually match. |
CGFloat yOffset = kLinkSpacing; |
- // Since drawing happens bottom-up, start with the "New User" link. |
- NSButton* newButton = [self configureNewUserButton:yOffset]; |
- [contentView addSubview:newButton]; |
- yOffset += NSHeight([newButton frame]) + kVerticalSpacing; |
- |
- NSBox* separator = [self separatorWithFrame: |
- NSMakeRect(10, yOffset, NSWidth([contentView frame]) - 20, 0)]; |
- [separator setAutoresizingMask:NSViewWidthSizable]; |
- [contentView addSubview:separator]; |
- |
- yOffset += NSHeight([separator frame]); |
+ if (model_->ShouldShowAddNewProfileLink()) { |
+ // Since drawing happens bottom-up, start with the "New User" link. |
+ NSButton* newButton = [self configureNewUserButton:yOffset]; |
+ [contentView addSubview:newButton]; |
+ yOffset += NSHeight([newButton frame]) + kVerticalSpacing; |
+ |
+ NSBox* separator = [self separatorWithFrame: |
+ NSMakeRect(10, yOffset, NSWidth([contentView frame]) - 20, 0)]; |
+ [separator setAutoresizingMask:NSViewWidthSizable]; |
+ [contentView addSubview:separator]; |
+ |
+ yOffset += NSHeight([separator frame]); |
+ } else { |
+ yOffset = 7; |
+ } |
// Loop over the profiles in reverse, constructing the menu items. |
CGFloat widthAdjust = 0; |