OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/chromeos/login/users/chrome_user_manager_impl.h" | 5 #include "chrome/browser/chromeos/login/users/chrome_user_manager_impl.h" |
6 | 6 |
7 #include <cstddef> | 7 #include <cstddef> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "ash/multi_profile_uma.h" | 10 #include "ash/multi_profile_uma.h" |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 multi_profile_user_controller_->IsUserAllowedInSession((*it)->email(), | 211 multi_profile_user_controller_->IsUserAllowedInSession((*it)->email(), |
212 &check); | 212 &check); |
213 if (check == | 213 if (check == |
214 MultiProfileUserController::NOT_ALLOWED_PRIMARY_USER_POLICY_FORBIDS) { | 214 MultiProfileUserController::NOT_ALLOWED_PRIMARY_USER_POLICY_FORBIDS) { |
215 return user_manager::UserList(); | 215 return user_manager::UserList(); |
216 } | 216 } |
217 | 217 |
218 // Users with a policy that prevents them being added to a session will be | 218 // Users with a policy that prevents them being added to a session will be |
219 // shown in login UI but will be grayed out. | 219 // shown in login UI but will be grayed out. |
220 // Same applies to owner account (see http://crbug.com/385034). | 220 // Same applies to owner account (see http://crbug.com/385034). |
221 if (check == MultiProfileUserController::ALLOWED || | 221 result.push_back(*it); |
222 check == MultiProfileUserController::NOT_ALLOWED_POLICY_FORBIDS || | |
223 check == MultiProfileUserController::NOT_ALLOWED_OWNER_AS_SECONDARY || | |
224 check == | |
225 MultiProfileUserController::NOT_ALLOWED_POLICY_CERT_TAINTED) { | |
226 result.push_back(*it); | |
227 } | |
228 } | 222 } |
229 } | 223 } |
230 | 224 |
231 return result; | 225 return result; |
232 } | 226 } |
233 | 227 |
234 user_manager::UserList ChromeUserManagerImpl::GetUnlockUsers() const { | 228 user_manager::UserList ChromeUserManagerImpl::GetUnlockUsers() const { |
235 const user_manager::UserList& logged_in_users = GetLoggedInUsers(); | 229 const user_manager::UserList& logged_in_users = GetLoggedInUsers(); |
236 if (logged_in_users.empty()) | 230 if (logged_in_users.empty()) |
237 return user_manager::UserList(); | 231 return user_manager::UserList(); |
(...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1031 if ((users + GetUsersAdmittedForMultiProfile().size()) > 1) | 1025 if ((users + GetUsersAdmittedForMultiProfile().size()) > 1) |
1032 ash::MultiProfileUMA::RecordUserCount(users); | 1026 ash::MultiProfileUMA::RecordUserCount(users); |
1033 } | 1027 } |
1034 | 1028 |
1035 base::debug::SetCrashKeyValue( | 1029 base::debug::SetCrashKeyValue( |
1036 crash_keys::kNumberOfUsers, | 1030 crash_keys::kNumberOfUsers, |
1037 base::StringPrintf("%" PRIuS, GetLoggedInUsers().size())); | 1031 base::StringPrintf("%" PRIuS, GetLoggedInUsers().size())); |
1038 } | 1032 } |
1039 | 1033 |
1040 } // namespace chromeos | 1034 } // namespace chromeos |
OLD | NEW |