Chrome Release Bot (LUCI) 4762b62e7d Publish DEPS for 106.0.5249.13 1 ano atrás
..
core 4762b62e7d Publish DEPS for 106.0.5249.13 1 ano atrás
BUILD.gn 4762b62e7d Publish DEPS for 106.0.5249.13 1 ano atrás
DEPS 4762b62e7d Publish DEPS for 106.0.5249.13 1 ano atrás
DIR_METADATA 4762b62e7d Publish DEPS for 106.0.5249.13 1 ano atrás
OWNERS 4762b62e7d Publish DEPS for 106.0.5249.13 1 ano atrás
README.md 4762b62e7d Publish DEPS for 106.0.5249.13 1 ano atrás
session_manager_export.h 4762b62e7d Publish DEPS for 106.0.5249.13 1 ano atrás
session_manager_types.h 4762b62e7d Publish DEPS for 106.0.5249.13 1 ano atrás

README.md

SessionManager

This directory contains files for managing ChromeOS user sessions. It is a continuing effort to move the user session related code from UserManager and UserSessionManager to this directory.

It is put under components/ directory so that non-browser code could access it. However, ash/ code should access user sessions via ash::SessionController rather than this. SessionController/Client internally calls code here but it provides a separation of ash and browser. It would be nice to keep it.

The core/ directory contains the SessionManager class. It provides an interface to create user sessions, add/remove observers, and check user session state. User session managing methods are not ready for external code to use. They are still expected to be called from the current user session starting code path, i.e. UserSessionManager and ChromeSessionManager.

SessionManager::Get() method gets the singleton like instance. The instance in Chrome browser is ChromeSessionManager derived from SessionManager. This is needed because SessionManager logic depends on policy code which is still part of the browser. ChromeSessionManager is in browser/ and can access that. The ChromeSessionManager instance is created in the PreCreateMainMessageLoop stage and destroyed in the PostMainMessageLoopRun.