| Index: chrome/browser/ui/cocoa/browser/avatar_button_controller.mm
|
| diff --git a/chrome/browser/ui/cocoa/browser/avatar_button_controller.mm b/chrome/browser/ui/cocoa/browser/avatar_button_controller.mm
|
| index 3537ad9af71fec8e16c557ccf39d1546369a06f9..9c48299ea61e9c90285420fec72fe0246789c841 100644
|
| --- a/chrome/browser/ui/cocoa/browser/avatar_button_controller.mm
|
| +++ b/chrome/browser/ui/cocoa/browser/avatar_button_controller.mm
|
| @@ -234,16 +234,14 @@ const CGFloat kMenuYOffsetAdjust = 1.0;
|
| - (void)updateAvatar {
|
| ProfileInfoCache& cache =
|
| g_browser_process->profile_manager()->GetProfileInfoCache();
|
| - size_t index =
|
| - cache.GetIndexOfProfileWithPath(browser_->profile()->GetPath());
|
| - if (index != std::string::npos) {
|
| - [self setImage:cache.GetAvatarIconOfProfileAtIndex(index).ToNSImage()];
|
| -
|
| - const string16& name = cache.GetNameOfProfileAtIndex(index);
|
| - NSString* nsName = base::SysUTF16ToNSString(name);
|
| - [self.view setToolTip:nsName];
|
| + ProfileInfoEntry entry;
|
| + if (cache.GetInfoForProfile(browser_->profile()->GetPath(), &entry)) {
|
| + [self setImage:entry.GetIcon().ToNSImage()];
|
| +
|
| + NSString* name = base::SysUTF16ToNSString(entry.name());
|
| + [self.view setToolTip:name];
|
| [[self.buttonView cell]
|
| - accessibilitySetOverrideValue:nsName
|
| + accessibilitySetOverrideValue:name
|
| forAttribute:NSAccessibilityValueAttribute];
|
| }
|
| }
|
|
|