| Index: ash/session/session_state_delegate.cc
|
| diff --git a/ash/session/session_state_delegate.cc b/ash/session/session_state_delegate.cc
|
| index e55a5adf55e794ed87f55150b4704d43b1e40887..787b54f586b2cbebed42a0d79550f962f7daf728 100644
|
| --- a/ash/session/session_state_delegate.cc
|
| +++ b/ash/session/session_state_delegate.cc
|
| @@ -11,4 +11,19 @@ bool SessionStateDelegate::IsInSecondaryLoginScreen() const {
|
| ash::SessionStateDelegate::SESSION_STATE_LOGIN_SECONDARY;
|
| }
|
|
|
| +bool SessionStateDelegate::CanAddUserToMultiProfile(
|
| + SessionStateDelegate::MultiProfileAddUserError* error) const {
|
| + if (!IsMultiProfileAllowedByPrimaryUserPolicy()) {
|
| + if (error)
|
| + *error = MULTIPROFILE_ADD_USER_ERROR_NOT_ALLOWED_PRIMARY_USER;
|
| + return false;
|
| + }
|
| + if (NumberOfLoggedInUsers() >= GetMaximumNumberOfLoggedInUsers()) {
|
| + if (error)
|
| + *error = MULTIPROFILE_ADD_USER_ERROR_MAXIMUM_OF_USERS_REACHED;
|
| + return false;
|
| + }
|
| + return true;
|
| +}
|
| +
|
| } // namespace ash
|
|
|