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

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

Issue 14507003: Add tray warning for Locally managed users. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix win-aura compile error Created 7 years, 8 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/tray/test_system_tray_delegate.cc ('k') | chrome/app/chromeos_strings.grdp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/user/tray_user.cc
diff --git a/ash/system/user/tray_user.cc b/ash/system/user/tray_user.cc
index 60b0d8dc5bd9fad4ae8bc27089c4fb85161a8ead..1532c526f3f2a03f4146ffb5288db5c1ef047676 100644
--- a/ash/system/user/tray_user.cc
+++ b/ash/system/user/tray_user.cc
@@ -553,12 +553,18 @@ void UserView::AddUserCard(SystemTrayItem* owner,
username->SetHorizontalAlignment(gfx::ALIGN_LEFT);
details->AddChildView(username);
- views::Label* email = new views::Label(UTF8ToUTF16(delegate->GetUserEmail()));
ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
- email->SetFont(bundle.GetFont(ui::ResourceBundle::SmallFont));
- email->SetHorizontalAlignment(gfx::ALIGN_LEFT);
- email->SetEnabled(false);
- details->AddChildView(email);
+
+ views::Label* additional = new views::Label();
+
+ additional->SetText(login == ash::user::LOGGED_IN_LOCALLY_MANAGED ?
+ bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_LOCALLY_MANAGED_LABEL) :
+ UTF8ToUTF16(delegate->GetUserEmail()));
+
+ additional->SetFont(bundle.GetFont(ui::ResourceBundle::SmallFont));
+ additional->SetHorizontalAlignment(gfx::ALIGN_LEFT);
+ additional->SetEnabled(false);
+ details->AddChildView(additional);
user_card_->AddChildView(details);
}
« no previous file with comments | « ash/system/tray/test_system_tray_delegate.cc ('k') | chrome/app/chromeos_strings.grdp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698