Chromium Code Reviews| Index: ash/session/session_state_delegate.h |
| diff --git a/ash/session/session_state_delegate.h b/ash/session/session_state_delegate.h |
| index c1c07137105fede9e833dff7e3aef703dcb2ea0d..9f963c93f9723c5777066cda04c5dddaddd771cd 100644 |
| --- a/ash/session/session_state_delegate.h |
| +++ b/ash/session/session_state_delegate.h |
| @@ -49,6 +49,12 @@ class ASH_EXPORT SessionStateDelegate { |
| CYCLE_TO_PREVIOUS_USER, // Cycle to the previous user. |
| }; |
| + enum MultiProfileAddUserError { |
|
James Cook
2014/09/23 16:02:12
This is fine, but I would also be OK with a shorte
Roman Sorokin (ftl)
2014/09/24 08:30:47
Done.
|
| + MULTIPROFILE_ADD_USER_ERROR_NOT_ALLOWED_PRIMARY_USER = 0, |
| + MULTIPROFILE_ADD_USER_ERROR_OUT_OF_USERS, |
| + MULTIPROFILE_ADD_USER_ERROR_MAXIMUM_OF_USERS_REACHED, |
|
James Cook
2014/09/23 16:02:12
nit: I would say _MAXIMUM_USERS_REACHED
Roman Sorokin (ftl)
2014/09/24 08:30:47
Done.
|
| + }; |
| + |
| // Defines session state i.e. whether session is running or not and |
| // whether user session is blocked by things like multi-profile login. |
| enum SessionState { |
| @@ -82,6 +88,11 @@ class ASH_EXPORT SessionStateDelegate { |
| // no session in progress or no active user. |
| virtual int NumberOfLoggedInUsers() const = 0; |
| + // Returns true if there is possible to add more users to multiprofile |
| + // session. Error is stored in |error| if it is not NULL and function |
| + // returned false. |
| + virtual bool CanAddUserToMultiProfile(MultiProfileAddUserError* error) const; |
| + |
| // Returns |true| if the session has been fully started for the active user. |
| // When a user becomes active, the profile and browser UI are not immediately |
| // available. Only once this method starts returning |true| is the browser |