Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1343)

Unified Diff: ash/system/user/user_card_view.cc

Issue 2911493002: cros: Pull user info from session_controller_client.mojom into separate mojom. (Closed)
Patch Set: Fix ordering in typemaps Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/system/user/tray_user_unittest.cc ('k') | ash/system/user/user_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/user/user_card_view.cc
diff --git a/ash/system/user/user_card_view.cc b/ash/system/user/user_card_view.cc
index d507667d5662258cae7f1fa174373a010d0e2706..735395ddc8742db10baef1a85d791d61ab8f754c 100644
--- a/ash/system/user/user_card_view.cc
+++ b/ash/system/user/user_card_view.cc
@@ -65,8 +65,9 @@ views::View* CreateUserAvatarView(LoginStatus login_status, int user_index) {
image_view->SetImage(icon, icon.size());
} else {
SessionController* controller = Shell::Get()->session_controller();
- image_view->SetImage(controller->GetUserSession(user_index)->avatar,
- gfx::Size(kTrayItemSize, kTrayItemSize));
+ image_view->SetImage(
+ controller->GetUserSession(user_index)->user_info->avatar,
+ gfx::Size(kTrayItemSize, kTrayItemSize));
}
image_view->SetBorder(views::CreateEmptyBorder(gfx::Insets(
@@ -116,8 +117,11 @@ PublicAccountUserDetails::PublicAccountUserDetails() : learn_more_(nullptr) {
// 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 = base::UTF8ToUTF16(
- Shell::Get()->session_controller()->GetUserSession(0)->display_name);
+ base::string16 display_name =
+ base::UTF8ToUTF16(Shell::Get()
+ ->session_controller()
+ ->GetUserSession(0)
+ ->user_info->display_name);
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.
@@ -382,8 +386,8 @@ void UserCardView::AddUserContent(views::BoxLayout* layout,
base::string16 user_name_string =
login_status == LoginStatus::GUEST
? l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_GUEST_LABEL)
- : base::UTF8ToUTF16(
- controller->GetUserSession(user_index_)->display_name);
+ : base::UTF8ToUTF16(controller->GetUserSession(user_index_)
+ ->user_info->display_name);
user_name_ = new views::Label(user_name_string);
user_name_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
TrayPopupItemStyle user_name_style(
@@ -398,8 +402,8 @@ void UserCardView::AddUserContent(views::BoxLayout* layout,
user_email_string =
Shell::Get()->session_controller()->IsUserSupervised()
? l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_SUPERVISED_LABEL)
- : base::UTF8ToUTF16(
- controller->GetUserSession(user_index_)->display_email);
+ : base::UTF8ToUTF16(controller->GetUserSession(user_index_)
+ ->user_info->display_email);
}
user_email->SetText(user_email_string);
user_email->SetHorizontalAlignment(gfx::ALIGN_LEFT);
« no previous file with comments | « ash/system/user/tray_user_unittest.cc ('k') | ash/system/user/user_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698