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 <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
547 GURL(chrome::kLearnMoreEnterpriseURL)); | 547 GURL(chrome::kLearnMoreEnterpriseURL)); |
548 } | 548 } |
549 } | 549 } |
550 | 550 |
551 void SystemTrayDelegateChromeOS::ShowUserLogin() { | 551 void SystemTrayDelegateChromeOS::ShowUserLogin() { |
552 ash::Shell* shell = ash::Shell::GetInstance(); | 552 ash::Shell* shell = ash::Shell::GetInstance(); |
553 if (!shell->delegate()->IsMultiProfilesEnabled()) | 553 if (!shell->delegate()->IsMultiProfilesEnabled()) |
554 return; | 554 return; |
555 | 555 |
556 // Only regular users could add other users to current session. | 556 // Only regular users could add other users to current session. |
557 if (user_manager::UserManager::Get()->GetActiveUser()->GetType() != | 557 if (!user_manager::UserManager::Get()->GetActiveUser()->IsRegular()) |
Nikita (slow)
2014/11/11 12:06:36
IsRegular() && !IsSupervised()
Might as well add
merkulova
2014/11/11 15:47:43
As far as we need it once for now, leaving it as c
| |
558 user_manager::USER_TYPE_REGULAR) { | |
559 return; | 558 return; |
560 } | |
561 | 559 |
562 if (static_cast<int>( | 560 if (static_cast<int>( |
563 user_manager::UserManager::Get()->GetLoggedInUsers().size()) >= | 561 user_manager::UserManager::Get()->GetLoggedInUsers().size()) >= |
564 shell->session_state_delegate()->GetMaximumNumberOfLoggedInUsers()) | 562 shell->session_state_delegate()->GetMaximumNumberOfLoggedInUsers()) |
565 return; | 563 return; |
566 | 564 |
567 // Launch sign in screen to add another user to current session. | 565 // Launch sign in screen to add another user to current session. |
568 if (user_manager::UserManager::Get() | 566 if (user_manager::UserManager::Get() |
569 ->GetUsersAllowedForMultiProfile() | 567 ->GetUsersAllowedForMultiProfile() |
570 .size()) { | 568 .size()) { |
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1311 accessibility_subscription_.reset(); | 1309 accessibility_subscription_.reset(); |
1312 else | 1310 else |
1313 OnAccessibilityModeChanged(details.notify); | 1311 OnAccessibilityModeChanged(details.notify); |
1314 } | 1312 } |
1315 | 1313 |
1316 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { | 1314 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { |
1317 return new SystemTrayDelegateChromeOS(); | 1315 return new SystemTrayDelegateChromeOS(); |
1318 } | 1316 } |
1319 | 1317 |
1320 } // namespace chromeos | 1318 } // namespace chromeos |
OLD | NEW |