Chromium Code Reviews| Index: components/arc/arc_util.cc |
| diff --git a/components/arc/arc_util.cc b/components/arc/arc_util.cc |
| index 7c3ee3f5a080b7e1b4d0b82dc0bbc686873c5b5e..4e3e165d037b679ac24087b09a09d470322e9712 100644 |
| --- a/components/arc/arc_util.cc |
| +++ b/components/arc/arc_util.cc |
| @@ -94,6 +94,12 @@ bool IsArcKioskMode() { |
| user_manager::UserManager::Get()->IsLoggedInAsArcKioskApp(); |
| } |
| +bool IsArcAllowedForUser(const user_manager::User* user) { |
| + return user && |
|
hidehiko
2017/05/17 02:09:45
Instead of oneline, could you use if-stmt, and vlo
xiyuan
2017/05/17 21:36:14
Done.
|
| + (user->HasGaiaAccount() || (user->IsActiveDirectoryUser() && |
| + IsArcAllowedForActiveDirectoryUsers())); |
| +} |
| + |
| bool IsArcAllowedForActiveDirectoryUsers() { |
| const auto* command_line = base::CommandLine::ForCurrentProcess(); |