| 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 "components/user_manager/user_manager_base.h" | 5 #include "components/user_manager/user_manager_base.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 GuestUserLoggedIn(); | 154 GuestUserLoggedIn(); |
| 155 } else if (IsDemoApp(account_id)) { | 155 } else if (IsDemoApp(account_id)) { |
| 156 DemoAccountLoggedIn(); | 156 DemoAccountLoggedIn(); |
| 157 } else { | 157 } else { |
| 158 EnsureUsersLoaded(); | 158 EnsureUsersLoaded(); |
| 159 | 159 |
| 160 if (user && user->GetType() == USER_TYPE_PUBLIC_ACCOUNT) { | 160 if (user && user->GetType() == USER_TYPE_PUBLIC_ACCOUNT) { |
| 161 PublicAccountUserLoggedIn(user); | 161 PublicAccountUserLoggedIn(user); |
| 162 } else if (user && user->GetType() == USER_TYPE_KIOSK_APP) { | 162 } else if (user && user->GetType() == USER_TYPE_KIOSK_APP) { |
| 163 KioskAppLoggedIn(user); | 163 KioskAppLoggedIn(user); |
| 164 } else if (user && user->GetType() == USER_TYPE_ARC_KIOSK_APP) { |
| 165 ArcKioskAppLoggedIn(user); |
| 164 } else if ((user && user->GetType() == USER_TYPE_SUPERVISED) || | 166 } else if ((user && user->GetType() == USER_TYPE_SUPERVISED) || |
| 165 (!user && IsSupervisedAccountId(account_id))) { | 167 (!user && IsSupervisedAccountId(account_id))) { |
| 166 SupervisedUserLoggedIn(account_id); | 168 SupervisedUserLoggedIn(account_id); |
| 167 } else if (browser_restart && | 169 } else if (browser_restart && |
| 168 IsDeviceLocalAccountMarkedForRemoval(account_id)) { | 170 IsDeviceLocalAccountMarkedForRemoval(account_id)) { |
| 169 PublicAccountUserLoggedIn(User::CreatePublicAccountUser(account_id)); | 171 PublicAccountUserLoggedIn(User::CreatePublicAccountUser(account_id)); |
| 170 } else if (account_id != GetOwnerAccountId() && !user && | 172 } else if (account_id != GetOwnerAccountId() && !user && |
| 171 (AreEphemeralUsersEnabled() || browser_restart)) { | 173 (AreEphemeralUsersEnabled() || browser_restart)) { |
| 172 RegularUserLoggedInAsEphemeral(account_id); | 174 RegularUserLoggedInAsEphemeral(account_id); |
| 173 } else { | 175 } else { |
| (...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1069 } | 1071 } |
| 1070 | 1072 |
| 1071 void UserManagerBase::DeleteUser(User* user) { | 1073 void UserManagerBase::DeleteUser(User* user) { |
| 1072 const bool is_active_user = (user == active_user_); | 1074 const bool is_active_user = (user == active_user_); |
| 1073 delete user; | 1075 delete user; |
| 1074 if (is_active_user) | 1076 if (is_active_user) |
| 1075 active_user_ = nullptr; | 1077 active_user_ = nullptr; |
| 1076 } | 1078 } |
| 1077 | 1079 |
| 1078 } // namespace user_manager | 1080 } // namespace user_manager |
| OLD | NEW |