Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2232)

Unified Diff: chrome/browser/chromeos/login/screens/user_selection_screen.cc

Issue 2885933003: arc: Consolidate IsArcAllowedForUser logic (Closed)
Patch Set: add comment for arc kiosk user check Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/arc/arc_util.cc ('k') | components/arc/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3a5a6a212ef7f2418101f0966af13c207f386fde..7678705dbb03c1847712689540dfccb20e72c551 100644
--- a/chrome/browser/chromeos/login/screens/user_selection_screen.cc
+++ b/chrome/browser/chromeos/login/screens/user_selection_screen.cc
@@ -151,15 +151,9 @@ bool ShouldCheckNeedDircryptoMigration() {
// 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();
+ return user_manager::UserManager::IsInitialized() &&
+ arc::IsArcAllowedForUser(
+ user_manager::UserManager::Get()->FindUser(account_id));
}
} // namespace
« no previous file with comments | « chrome/browser/chromeos/arc/arc_util.cc ('k') | components/arc/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698