diff options
Diffstat (limited to 'ash/system/user/user_card_view.cc')
-rw-r--r-- | ash/system/user/user_card_view.cc | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/ash/system/user/user_card_view.cc b/ash/system/user/user_card_view.cc index 6d5413e..af568ae 100644 --- a/ash/system/user/user_card_view.cc +++ b/ash/system/user/user_card_view.cc @@ -7,7 +7,8 @@ #include <algorithm> #include <vector> -#include "ash/session_state_delegate.h" +#include "ash/session/session_state_delegate.h" +#include "ash/session/user_info.h" #include "ash/shell.h" #include "ash/system/tray/system_tray_delegate.h" #include "ash/system/tray/tray_constants.h" @@ -89,8 +90,10 @@ PublicAccountUserDetails::PublicAccountUserDetails(int max_width) // Retrieve the user's display name and wrap it with markers. // Note that since this is a public account it always has to be the primary // user. - base::string16 display_name = - Shell::GetInstance()->session_state_delegate()->GetUserDisplayName(0); + base::string16 display_name = Shell::GetInstance() + ->session_state_delegate() + ->GetUserInfo(0) + ->GetDisplayName(); base::RemoveChars(display_name, kDisplayNameMark, &display_name); display_name = kDisplayNameMark[0] + display_name + kDisplayNameMark[0]; // Retrieve the domain managing the device and wrap it with markers. @@ -305,10 +308,10 @@ void UserCardView::AddUserContent(user::LoginStatus login_status, base::string16 user_name_string = login_status == user::LOGGED_IN_GUEST ? l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_GUEST_LABEL) - : delegate->GetUserDisplayName(multiprofile_index); + : delegate->GetUserInfo(multiprofile_index)->GetDisplayName(); if (user_name_string.empty() && IsMultiAccountSupportedAndUserActive()) - user_name_string = - base::ASCIIToUTF16(delegate->GetUserEmail(multiprofile_index)); + user_name_string = base::ASCIIToUTF16( + delegate->GetUserInfo(multiprofile_index)->GetEmail()); if (!user_name_string.empty()) { username = new views::Label(user_name_string); username->SetHorizontalAlignment(gfx::ALIGN_LEFT); @@ -322,7 +325,8 @@ void UserCardView::AddUserContent(user::LoginStatus login_status, login_status == user::LOGGED_IN_LOCALLY_MANAGED ? l10n_util::GetStringUTF16( IDS_ASH_STATUS_TRAY_LOCALLY_MANAGED_LABEL) - : base::UTF8ToUTF16(delegate->GetUserEmail(multiprofile_index)); + : base::UTF8ToUTF16( + delegate->GetUserInfo(multiprofile_index)->GetEmail()); if (!user_email_string.empty()) { additional = new views::Label(user_email_string); additional->SetFontList( @@ -372,7 +376,7 @@ views::View* UserCardView::CreateIcon(user::LoginStatus login_status, Shell::GetInstance()->session_state_delegate(); content::BrowserContext* context = delegate->GetBrowserContextByIndex(multiprofile_index); - icon->SetImage(delegate->GetUserImage(context), + icon->SetImage(delegate->GetUserInfo(context)->GetImage(), gfx::Size(kTrayAvatarSize, kTrayAvatarSize)); } return icon; |