| Index: components/arc/arc_util.cc
|
| diff --git a/components/arc/arc_util.cc b/components/arc/arc_util.cc
|
| index 963368e3bc4c366869ef303f26fcbfb5f94b2520..a3cd4a5e96b1f241ddab3a19d58afb4a518839e4 100644
|
| --- a/components/arc/arc_util.cc
|
| +++ b/components/arc/arc_util.cc
|
| @@ -97,6 +97,29 @@ bool IsArcKioskMode() {
|
| user_manager::UserManager::Get()->IsLoggedInAsArcKioskApp();
|
| }
|
|
|
| +bool IsArcAllowedForUser(const user_manager::User* user) {
|
| + if (!user) {
|
| + VLOG(1) << "No ARC for nullptr user.";
|
| + return false;
|
| + }
|
| +
|
| + if (!user->HasGaiaAccount() && !(user->IsActiveDirectoryUser() &&
|
| + IsArcAllowedForActiveDirectoryUsers())) {
|
| + VLOG(1) << "Users without GAIA or active directory users without support"
|
| + " are not supported in ARC.";
|
| + return false;
|
| + }
|
| +
|
| + // Do not allow for ephemeral data user. cf) b/26402681
|
| + if (user_manager::UserManager::Get()->IsUserCryptohomeDataEphemeral(
|
| + user->GetAccountId())) {
|
| + VLOG(1) << "Users with ephemeral data are not supported in ARC.";
|
| + return false;
|
| + }
|
| +
|
| + return true;
|
| +}
|
| +
|
| bool IsArcAllowedForActiveDirectoryUsers() {
|
| const auto* command_line = base::CommandLine::ForCurrentProcess();
|
|
|
|
|