| Index: chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm
|
| diff --git a/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm b/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm
|
| index 328a875de2aaf489e73b14c1d5577de94c879db3..5b34ac922137211f3fa43e5318b659b0dc8cf4f6 100644
|
| --- a/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm
|
| +++ b/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm
|
| @@ -2049,6 +2049,8 @@ class ActiveProfileObserverBridge : public AvatarMenuObserver,
|
| }
|
|
|
| // Profile card button that contains the profile icon, name, and username.
|
| + const base::string16 profileNameString =
|
| + profiles::GetAvatarNameForProfile(browser_->profile()->GetPath());
|
| NSRect rect = NSMakeRect(0, yOffset, GetFixedMenuWidth(),
|
| kMdImageSide + kVerticalSpacing);
|
| NSButton* profileCard =
|
| @@ -2058,6 +2060,20 @@ class ActiveProfileObserverBridge : public AvatarMenuObserver,
|
| profiles::SHAPE_CIRCLE)
|
| action:@selector(editProfile:)];
|
| [[profileCard cell] setImageDimsWhenDisabled:NO];
|
| + if (item.signed_in) {
|
| + [[profileCard cell]
|
| + accessibilitySetOverrideValue:
|
| + l10n_util::GetNSStringF(
|
| + IDS_PROFILES_EDIT_SIGNED_IN_PROFILE_ACCESSIBLE_NAME,
|
| + profileNameString, item.username)
|
| + forAttribute:NSAccessibilityTitleAttribute];
|
| + } else {
|
| + [[profileCard cell]
|
| + accessibilitySetOverrideValue:
|
| + l10n_util::GetNSStringF(IDS_PROFILES_EDIT_PROFILE_ACCESSIBLE_NAME,
|
| + profileNameString)
|
| + forAttribute:NSAccessibilityTitleAttribute];
|
| + }
|
| [container addSubview:profileCard];
|
| if (isGuestSession_)
|
| [profileCard setEnabled:NO];
|
| @@ -2087,10 +2103,8 @@ class ActiveProfileObserverBridge : public AvatarMenuObserver,
|
| // Profile name, left-aligned to the right of profile icon.
|
| xOffset += kMdImageSide + kHorizontalSpacing;
|
| CGFloat fontSize = kTextFontSize + 1.0;
|
| - NSTextField* profileName = BuildLabel(
|
| - base::SysUTF16ToNSString(
|
| - profiles::GetAvatarNameForProfile(browser_->profile()->GetPath())),
|
| - NSZeroPoint, nil);
|
| + NSTextField* profileName =
|
| + BuildLabel(base::SysUTF16ToNSString(profileNameString), NSZeroPoint, nil);
|
| [[profileName cell] setLineBreakMode:NSLineBreakByTruncatingTail];
|
| [profileName setFont:[NSFont labelFontOfSize:fontSize]];
|
| [profileName sizeToFit];
|
|
|