Index: ash/system/tray/system_tray.cc |
diff --git a/ash/system/tray/system_tray.cc b/ash/system/tray/system_tray.cc |
index 8dc0fa4bc83b3b0301e67f0900ca16738bf451cf..d8685f993a84f6c8005b6ab92d41104faa36ce06 100644 |
--- a/ash/system/tray/system_tray.cc |
+++ b/ash/system/tray/system_tray.cc |
@@ -63,6 +63,9 @@ using views::TrayBubbleView; |
namespace ash { |
+// The maximum number of simultaneous user profiles. |
+const int kMaxSimultaneousUserProfiles = 3; |
+ |
// The minimum width of the system tray menu width. |
const int kMinimumSystemTrayMenuWidth = 300; |
@@ -138,7 +141,14 @@ void SystemTray::CreateItems(SystemTrayDelegate* delegate) { |
#if !defined(OS_WIN) |
AddTrayItem(new internal::TraySessionLengthLimit(this)); |
AddTrayItem(new internal::TrayLogoutButton(this)); |
- AddTrayItem(new internal::TrayUser(this)); |
+ // In multi-profile user mode we can have multiple user tiles. |
+ // The additional entry is used for a double separator. |
+ int maximum_user_profiles = |
+ ash::Shell::GetInstance()->delegate()->IsMultiProfilesEnabled() ? |
+ (kMaxSimultaneousUserProfiles + 1): 1; |
+ for (int i = 0; i < maximum_user_profiles; i++) |
+ AddTrayItem(new internal::TrayUser(this, i)); |
+ |
#endif |
#if defined(OS_CHROMEOS) |
AddTrayItem(new internal::TrayEnterprise(this)); |