blob: 96f91934035aadf71586c893c792bcd8688985e2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ash/session/session_state_delegate.h"
namespace ash {
bool SessionStateDelegate::IsInSecondaryLoginScreen() const {
return GetSessionState() ==
ash::SessionStateDelegate::SESSION_STATE_LOGIN_SECONDARY;
}
bool SessionStateDelegate::CanAddUserToMultiProfile(
SessionStateDelegate::AddUserError* error) const {
if (!IsMultiProfileAllowedByPrimaryUserPolicy()) {
if (error)
*error = ADD_USER_ERROR_NOT_ALLOWED_PRIMARY_USER;
return false;
}
if (NumberOfLoggedInUsers() >= GetMaximumNumberOfLoggedInUsers()) {
if (error)
*error = ADD_USER_ERROR_MAXIMUM_USERS_REACHED;
return false;
}
return true;
}
} // namespace ash
|