Xiyuan Xia | 593f963 | 2020-06-29 15:27:17 | [diff] [blame] | 1 | # UserManager |
| 2 | |
| 3 | This directory contains files for managing ChromeOS users. Historically, |
| 4 | the code manages both user and user sessions. There is an on-going effort |
| 5 | to move user session related code into //components/session_manager. |
| 6 | |
Hidehiko Abe | 4e0baf9 | 2024-10-07 18:05:58 | [diff] [blame] | 7 | UserManager is the interface for managing ChromeOS users. UserManagerImpl |
Hidehiko Abe | 1bd40d7 | 2024-10-09 16:36:19 | [diff] [blame] | 8 | is the production implementation of the interface. |
Xiyuan Xia | 593f963 | 2020-06-29 15:27:17 | [diff] [blame] | 9 | |
Hidehiko Abe | 1bd40d7 | 2024-10-09 16:36:19 | [diff] [blame] | 10 | UserManagerImpl is created at the PreProfileInit stage and destroyed at |
Xiyuan Xia | 593f963 | 2020-06-29 15:27:17 | [diff] [blame] | 11 | the PostMainMessageLoopRun stage, via |
Hidehiko Abe | c145a73 | 2024-02-15 05:26:35 | [diff] [blame] | 12 | BrowserProcessPlatformPart::InitializeUserManager() and |
| 13 | BrowserProcessPlatformPart::DestroyUserManager. |
Elie Maamari | f29f0d9 | 2022-08-17 08:51:20 | [diff] [blame] | 14 | |
| 15 | # UserDirectoryIntegrityManager |
| 16 | |
| 17 | This directory contains the UserDirectoryIntegrityManager class. |
| 18 | This class is responsible for detecting when a user did not completely |
| 19 | complete the onboarding flow and crashed before adding an auth factor. |
| 20 | This can leave the user in an inconsistent state as their home directory |
| 21 | will be encrypted with no auth factors added. |
| 22 | |
| 23 | UserDirectoryIntegrityManager writes the user's email to local state |
| 24 | before creating the user home directory and erases it after adding a |
| 25 | successful auth factor. Those operations are initiated from |
| 26 | `MountPerformer::CreateNewUser` and `AuthFactorEditor::OnAddCredentials` |
| 27 | respectively. |
| 28 | |
| 29 | [design doc](https://docs.google.com/document/d/1SjVwlckD-cB9zC84RfmHbsflD3g01lKm8m21Dh1sn70/edit?resourcekey=0-SseJsx99IUSckOWDqHh69g#) |