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

Unified Diff: chrome/browser/chromeos/arc/arc_util.cc

Issue 2655873002: Get enrollment token from DMServer when an Active Directory user uses ARC (Closed)
Patch Set: Fix Luis's comments Created 3 years, 10 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_session_manager.h ('k') | chrome/browser/chromeos/arc/arc_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/arc/arc_util.cc
diff --git a/chrome/browser/chromeos/arc/arc_util.cc b/chrome/browser/chromeos/arc/arc_util.cc
index 5a0eef24cd9d1bef5d8c7d1f3405ba2a1ddfe4b8..03dab5b1acf73ab56a7522f17508403028975947 100644
--- a/chrome/browser/chromeos/arc/arc_util.cc
+++ b/chrome/browser/chromeos/arc/arc_util.cc
@@ -55,12 +55,17 @@ bool IsArcAllowedForProfile(const Profile* profile) {
return false;
}
- // Do not allow for public session. Communicating with Play Store requires
- // GAIA account. An exception is Kiosk mode, which uses different application
- // install mechanism. cf) crbug.com/605545
+ // Play Store requires an appropriate application install mechanism. Normal
+ // users do this through GAIA, but Kiosk and Active Directory users use
+ // different application install mechanism. ARC is not allowed otherwise
+ // (e.g. in public sessions). cf) crbug.com/605545
const user_manager::User* user =
chromeos::ProfileHelper::Get()->GetUserByProfile(profile);
- if ((!user || !user->HasGaiaAccount()) && !IsArcKioskMode()) {
+ const bool has_gaia_account = user && user->HasGaiaAccount();
+ const bool is_arc_active_directory_user =
+ user && user->IsActiveDirectoryUser() &&
+ IsArcAllowedForActiveDirectoryUsers();
+ if (!has_gaia_account && !is_arc_active_directory_user && !IsArcKioskMode()) {
VLOG(1) << "Users without GAIA accounts are not supported in ARC.";
return false;
}
« no previous file with comments | « chrome/browser/chromeos/arc/arc_session_manager.h ('k') | chrome/browser/chromeos/arc/arc_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698