| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h" | 5 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 if (!wm_shell->delegate()->IsMultiProfilesEnabled()) | 327 if (!wm_shell->delegate()->IsMultiProfilesEnabled()) |
| 328 return; | 328 return; |
| 329 | 329 |
| 330 // Only regular non-supervised users could add other users to current session. | 330 // Only regular non-supervised users could add other users to current session. |
| 331 if (user_manager::UserManager::Get()->GetActiveUser()->GetType() != | 331 if (user_manager::UserManager::Get()->GetActiveUser()->GetType() != |
| 332 user_manager::USER_TYPE_REGULAR) { | 332 user_manager::USER_TYPE_REGULAR) { |
| 333 return; | 333 return; |
| 334 } | 334 } |
| 335 | 335 |
| 336 if (user_manager::UserManager::Get()->GetLoggedInUsers().size() >= | 336 if (user_manager::UserManager::Get()->GetLoggedInUsers().size() >= |
| 337 session_manager::SessionManager::Get() | 337 session_manager::kMaxmiumNumberOfUserSessions) { |
| 338 ->GetMaximumNumberOfUserSessions()) { | |
| 339 return; | 338 return; |
| 340 } | 339 } |
| 341 | 340 |
| 342 // Launch sign in screen to add another user to current session. | 341 // Launch sign in screen to add another user to current session. |
| 343 if (user_manager::UserManager::Get() | 342 if (user_manager::UserManager::Get() |
| 344 ->GetUsersAllowedForMultiProfile() | 343 ->GetUsersAllowedForMultiProfile() |
| 345 .size()) { | 344 .size()) { |
| 346 // Don't show dialog if any logged in user in multi-profiles session | 345 // Don't show dialog if any logged in user in multi-profiles session |
| 347 // dismissed it. | 346 // dismissed it. |
| 348 bool show_intro = true; | 347 bool show_intro = true; |
| (...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 955 LOG(WARNING) << "SystemTrayDelegateChromeOS::GetChildUserMessage call while " | 954 LOG(WARNING) << "SystemTrayDelegateChromeOS::GetChildUserMessage call while " |
| 956 << "ENABLE_SUPERVISED_USERS undefined."; | 955 << "ENABLE_SUPERVISED_USERS undefined."; |
| 957 return base::string16(); | 956 return base::string16(); |
| 958 } | 957 } |
| 959 | 958 |
| 960 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { | 959 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { |
| 961 return new SystemTrayDelegateChromeOS(); | 960 return new SystemTrayDelegateChromeOS(); |
| 962 } | 961 } |
| 963 | 962 |
| 964 } // namespace chromeos | 963 } // namespace chromeos |
| OLD | NEW |