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

Side by Side Diff: chrome/browser/chromeos/login/users/chrome_user_manager.cc

Issue 374853002: Providing more information on why certain users can't be added to multi-profile (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added tests. Created 6 years, 4 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 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.h" 5 #include "chrome/browser/chromeos/login/users/chrome_user_manager.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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 if (check == 204 if (check ==
205 MultiProfileUserController::NOT_ALLOWED_PRIMARY_USER_POLICY_FORBIDS) { 205 MultiProfileUserController::NOT_ALLOWED_PRIMARY_USER_POLICY_FORBIDS) {
206 return user_manager::UserList(); 206 return user_manager::UserList();
207 } 207 }
208 208
209 // Users with a policy that prevents them being added to a session will be 209 // Users with a policy that prevents them being added to a session will be
210 // shown in login UI but will be grayed out. 210 // shown in login UI but will be grayed out.
211 // Same applies to owner account (see http://crbug.com/385034). 211 // Same applies to owner account (see http://crbug.com/385034).
212 if (check == MultiProfileUserController::ALLOWED || 212 if (check == MultiProfileUserController::ALLOWED ||
213 check == MultiProfileUserController::NOT_ALLOWED_POLICY_FORBIDS || 213 check == MultiProfileUserController::NOT_ALLOWED_POLICY_FORBIDS ||
214 check == MultiProfileUserController::NOT_ALLOWED_OWNER_AS_SECONDARY) { 214 check == MultiProfileUserController::NOT_ALLOWED_OWNER_AS_SECONDARY ||
215 check ==
216 MultiProfileUserController::NOT_ALLOWED_POLICY_CERT_TAINTED) {
215 result.push_back(*it); 217 result.push_back(*it);
216 } 218 }
217 } 219 }
218 } 220 }
219 221
220 return result; 222 return result;
221 } 223 }
222 224
223 user_manager::UserList ChromeUserManager::GetUnlockUsers() const { 225 user_manager::UserList ChromeUserManager::GetUnlockUsers() const {
224 const user_manager::UserList& logged_in_users = GetLoggedInUsers(); 226 const user_manager::UserList& logged_in_users = GetLoggedInUsers();
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
1006 if ((users + GetUsersAdmittedForMultiProfile().size()) > 1) 1008 if ((users + GetUsersAdmittedForMultiProfile().size()) > 1)
1007 ash::MultiProfileUMA::RecordUserCount(users); 1009 ash::MultiProfileUMA::RecordUserCount(users);
1008 } 1010 }
1009 1011
1010 base::debug::SetCrashKeyValue( 1012 base::debug::SetCrashKeyValue(
1011 crash_keys::kNumberOfUsers, 1013 crash_keys::kNumberOfUsers,
1012 base::StringPrintf("%" PRIuS, GetLoggedInUsers().size())); 1014 base::StringPrintf("%" PRIuS, GetLoggedInUsers().size()));
1013 } 1015 }
1014 1016
1015 } // namespace chromeos 1017 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698