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

Side by Side Diff: chrome/browser/ui/ash/system_tray_delegate_chromeos.cc

Issue 718673002: New user type introduced. Combines regular and supervised features. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Logical expression fixed. Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
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 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 chrome::ShowSingletonTab(displayer.browser(), 546 chrome::ShowSingletonTab(displayer.browser(),
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 non-supervised users could add other users to current session.
557 if (user_manager::UserManager::Get()->GetActiveUser()->GetType() != 557 if (user_manager::UserManager::Get()->GetActiveUser()->GetType() !=
558 user_manager::USER_TYPE_REGULAR) { 558 user_manager::USER_TYPE_REGULAR) {
559 return; 559 return;
560 } 560 }
561 561
562 if (static_cast<int>( 562 if (static_cast<int>(
563 user_manager::UserManager::Get()->GetLoggedInUsers().size()) >= 563 user_manager::UserManager::Get()->GetLoggedInUsers().size()) >=
564 shell->session_state_delegate()->GetMaximumNumberOfLoggedInUsers()) 564 shell->session_state_delegate()->GetMaximumNumberOfLoggedInUsers())
565 return; 565 return;
566 566
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
1311 accessibility_subscription_.reset(); 1311 accessibility_subscription_.reset();
1312 else 1312 else
1313 OnAccessibilityModeChanged(details.notify); 1313 OnAccessibilityModeChanged(details.notify);
1314 } 1314 }
1315 1315
1316 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { 1316 ash::SystemTrayDelegate* CreateSystemTrayDelegate() {
1317 return new SystemTrayDelegateChromeOS(); 1317 return new SystemTrayDelegateChromeOS();
1318 } 1318 }
1319 1319
1320 } // namespace chromeos 1320 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698