Index: chrome/browser/ui/views/profiles/profile_chooser_view.cc |
diff --git a/chrome/browser/ui/views/profiles/profile_chooser_view.cc b/chrome/browser/ui/views/profiles/profile_chooser_view.cc |
index 88126598e7ed3f37cfd30565644f618b3f4d6cbc..b701eeb264ee5c6d4bfd03fbcd0c2935eb52479b 100644 |
--- a/chrome/browser/ui/views/profiles/profile_chooser_view.cc |
+++ b/chrome/browser/ui/views/profiles/profile_chooser_view.cc |
@@ -1291,7 +1291,7 @@ views::View* ProfileChooserView::CreateCurrentProfileAccountsView( |
Profile* profile = browser_->profile(); |
std::string primary_account = |
- SigninManagerFactory::GetForProfile(profile)->GetAuthenticatedUsername(); |
+ SigninManagerFactory::GetForProfile(profile)->GetAuthenticatedAccountId(); |
DCHECK(!primary_account.empty()); |
std::vector<std::string>accounts = |
profiles::GetSecondaryAccountsForProfile(profile, primary_account); |
@@ -1325,10 +1325,12 @@ views::View* ProfileChooserView::CreateCurrentProfileAccountsView( |
} |
void ProfileChooserView::CreateAccountButton(views::GridLayout* layout, |
- const std::string& account, |
+ const std::string& account_id, |
bool is_primary_account, |
bool reauth_required, |
int width) { |
+ std::string email = signin_ui_util::GetDisplayEmail(browser_->profile(), |
+ account_id); |
ui::ResourceBundle* rb = &ui::ResourceBundle::GetSharedInstance(); |
const gfx::ImageSkia* delete_default_image = |
rb->GetImageNamed(IDR_CLOSE_1).ToImageSkia(); |
@@ -1342,7 +1344,7 @@ void ProfileChooserView::CreateAccountButton(views::GridLayout* layout, |
- kDeleteButtonWidth - kWarningButtonWidth; |
views::LabelButton* email_button = new BackgroundColorHoverButton( |
reauth_required ? this : NULL, |
- base::UTF8ToUTF16(account), |
+ base::UTF8ToUTF16(email), |
warning_default_image); |
email_button->SetElideBehavior(gfx::ELIDE_EMAIL); |
email_button->SetMinSize(gfx::Size(0, kButtonHeight)); |
@@ -1351,7 +1353,7 @@ void ProfileChooserView::CreateAccountButton(views::GridLayout* layout, |
layout->AddView(email_button); |
if (reauth_required) |
- reauth_account_button_map_[email_button] = account; |
+ reauth_account_button_map_[email_button] = account_id; |
// Delete button. |
if (!browser_->profile()->IsSupervised()) { |
@@ -1372,7 +1374,7 @@ void ProfileChooserView::CreateAccountButton(views::GridLayout* layout, |
email_button->AddChildView(delete_button); |
// Save the original email address, as the button text could be elided. |
- delete_account_button_map_[delete_button] = account; |
+ delete_account_button_map_[delete_button] = account_id; |
} |
} |