| Index: ash/session/session_controller.cc
|
| diff --git a/ash/session/session_controller.cc b/ash/session/session_controller.cc
|
| index b546c92beb460d343e225adc25238ff112ea1449..873f5776316b3a1ef2e1b3e26da39876dad18853 100644
|
| --- a/ash/session/session_controller.cc
|
| +++ b/ash/session/session_controller.cc
|
| @@ -14,6 +14,7 @@
|
| #include "base/command_line.h"
|
| #include "chromeos/chromeos_switches.h"
|
| #include "components/signin/core/account_id/account_id.h"
|
| +#include "components/user_manager/user_type.h"
|
| #include "services/service_manager/public/cpp/connector.h"
|
|
|
| using session_manager::SessionState;
|
| @@ -126,6 +127,23 @@ const mojom::UserSession* SessionController::GetUserSession(
|
| return user_sessions_[index].get();
|
| }
|
|
|
| +bool SessionController::IsUserSupervised() const {
|
| + if (!IsActiveUserSessionStarted())
|
| + return false;
|
| +
|
| + user_manager::UserType active_user_type = GetUserSession(0)->type;
|
| + return active_user_type == user_manager::USER_TYPE_SUPERVISED ||
|
| + active_user_type == user_manager::USER_TYPE_CHILD;
|
| +}
|
| +
|
| +bool SessionController::IsUserChild() const {
|
| + if (!IsActiveUserSessionStarted())
|
| + return false;
|
| +
|
| + user_manager::UserType active_user_type = GetUserSession(0)->type;
|
| + return active_user_type == user_manager::USER_TYPE_CHILD;
|
| +}
|
| +
|
| void SessionController::LockScreen() {
|
| if (client_)
|
| client_->RequestLockScreen();
|
|
|