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

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

Issue 600733004: Rename GetUsersAdmittedForMultiProfile to GetUsersAllowedForMultiProfile (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/chrome_shell_delegate.h" 5 #include "chrome/browser/ui/ash/chrome_shell_delegate.h"
6 6
7 #include "ash/content_support/gpu_support_impl.h" 7 #include "ash/content_support/gpu_support_impl.h"
8 #include "ash/magnifier/magnifier_constants.h" 8 #include "ash/magnifier/magnifier_constants.h"
9 #include "ash/wm/window_state.h" 9 #include "ash/wm/window_state.h"
10 #include "ash/wm/window_util.h" 10 #include "ash/wm/window_util.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 } 43 }
44 44
45 bool ChromeShellDelegate::IsMultiProfilesEnabled() const { 45 bool ChromeShellDelegate::IsMultiProfilesEnabled() const {
46 if (!profiles::IsMultipleProfilesEnabled()) 46 if (!profiles::IsMultipleProfilesEnabled())
47 return false; 47 return false;
48 #if defined(OS_CHROMEOS) 48 #if defined(OS_CHROMEOS)
49 // If there is a user manager, we need to see that we can at least have 2 49 // If there is a user manager, we need to see that we can at least have 2
50 // simultaneous users to allow this feature. 50 // simultaneous users to allow this feature.
51 if (!user_manager::UserManager::IsInitialized()) 51 if (!user_manager::UserManager::IsInitialized())
52 return false; 52 return false;
53 size_t admitted_users_to_be_added = user_manager::UserManager::Get() 53 size_t admitted_users_to_be_added =
54 ->GetUsersAdmittedForMultiProfile() 54 user_manager::UserManager::Get()->GetUsersAllowedForMultiProfile().size();
55 .size();
56 size_t logged_in_users = 55 size_t logged_in_users =
57 user_manager::UserManager::Get()->GetLoggedInUsers().size(); 56 user_manager::UserManager::Get()->GetLoggedInUsers().size();
58 if (!logged_in_users) { 57 if (!logged_in_users) {
59 // The shelf gets created on the login screen and as such we have to create 58 // The shelf gets created on the login screen and as such we have to create
60 // all multi profile items of the the system tray menu before the user logs 59 // all multi profile items of the the system tray menu before the user logs
61 // in. For special cases like Kiosk mode and / or guest mode this isn't a 60 // in. For special cases like Kiosk mode and / or guest mode this isn't a
62 // problem since either the browser gets restarted and / or the flag is not 61 // problem since either the browser gets restarted and / or the flag is not
63 // allowed, but for an "ephermal" user (see crbug.com/312324) it is not 62 // allowed, but for an "ephermal" user (see crbug.com/312324) it is not
64 // decided yet if he could add other users to his session or not. 63 // decided yet if he could add other users to his session or not.
65 // TODO(skuhne): As soon as the issue above needs to be resolved, this logic 64 // TODO(skuhne): As soon as the issue above needs to be resolved, this logic
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 152
154 void ChromeShellDelegate::AddVirtualKeyboardStateObserver( 153 void ChromeShellDelegate::AddVirtualKeyboardStateObserver(
155 ash::VirtualKeyboardStateObserver* observer) { 154 ash::VirtualKeyboardStateObserver* observer) {
156 keyboard_state_observer_list_.AddObserver(observer); 155 keyboard_state_observer_list_.AddObserver(observer);
157 } 156 }
158 157
159 void ChromeShellDelegate::RemoveVirtualKeyboardStateObserver( 158 void ChromeShellDelegate::RemoveVirtualKeyboardStateObserver(
160 ash::VirtualKeyboardStateObserver* observer) { 159 ash::VirtualKeyboardStateObserver* observer) {
161 keyboard_state_observer_list_.RemoveObserver(observer); 160 keyboard_state_observer_list_.RemoveObserver(observer);
162 } 161 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698