Chromium Code Reviews| Index: chrome/browser/chromeos/login/screens/user_selection_screen.cc |
| diff --git a/chrome/browser/chromeos/login/screens/user_selection_screen.cc b/chrome/browser/chromeos/login/screens/user_selection_screen.cc |
| index 5578bd0709e3249607a3b7e135938d6a501baf7c..ed7ea4636810226a835f26872ebf757d62965dac 100644 |
| --- a/chrome/browser/chromeos/login/screens/user_selection_screen.cc |
| +++ b/chrome/browser/chromeos/login/screens/user_selection_screen.cc |
| @@ -149,6 +149,20 @@ bool ShouldCheckNeedDircryptoMigration() { |
| arc::IsArcAvailable(); |
| } |
| +// Returns true if the user can run ARC based on the user type. |
| +bool IsUserAllowedForARC(const AccountId& account_id) { |
| + if (!user_manager::UserManager::IsInitialized()) |
| + return false; |
| + |
| + const user_manager::User* user = |
| + user_manager::UserManager::Get()->FindUser(account_id); |
| + if (!user) |
| + return false; |
| + |
| + return user->HasGaiaAccount() || (user->IsActiveDirectoryUser() && |
|
kinaba
2017/05/16 05:12:39
Can this check filter out the
profile->IsLegacySup
xiyuan
2017/05/16 06:21:58
Yes, legacy supervised user is managed locally (i.
hidehiko
2017/05/16 06:31:54
What about Ephemeral case?
Also, can the logic ac
kinaba
2017/05/16 07:20:11
I believe ephemeral users don't have homedir to mi
xiyuan
2017/05/16 16:02:55
Correct. Ephemeral users would not have their cryp
|
| + arc::IsArcAllowedForActiveDirectoryUsers()); |
| +} |
| + |
| } // namespace |
| // Helper class to call cryptohome to check whether a user needs dircrypto |
| @@ -169,6 +183,12 @@ class UserSelectionScreen::DircryptoMigrationChecker { |
| return; |
| } |
| + // No banner if the user is not allowed for ARC. |
| + if (!IsUserAllowedForARC(account_id)) { |
| + UpdateUI(account_id, false); |
| + return; |
| + } |
| + |
| DBusThreadManager::Get() |
| ->GetCryptohomeClient() |
| ->WaitForServiceToBeAvailable( |