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

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

Issue 2513473006: Stop running arc container on supervised user creation flow (Closed)
Patch Set: rebased Created 4 years 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 | « no previous file | chrome/browser/chromeos/login/easy_unlock/bootstrap_user_flow.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/arc/arc_session_manager.cc
diff --git a/chrome/browser/chromeos/arc/arc_session_manager.cc b/chrome/browser/chromeos/arc/arc_session_manager.cc
index 2be4bdc26e5af6b124e6df5010c8ba1920421e2a..7b4e2835292917c1adb46ed9feffef350d95bbfd 100644
--- a/chrome/browser/chromeos/arc/arc_session_manager.cc
+++ b/chrome/browser/chromeos/arc/arc_session_manager.cc
@@ -22,6 +22,8 @@
#include "chrome/browser/chromeos/arc/optin/arc_terms_of_service_negotiator.h"
#include "chrome/browser/chromeos/arc/policy/arc_android_management_checker.h"
#include "chrome/browser/chromeos/arc/policy/arc_policy_util.h"
+#include "chrome/browser/chromeos/login/user_flow.h"
+#include "chrome/browser/chromeos/login/users/chrome_user_manager.h"
#include "chrome/browser/chromeos/profiles/profile_helper.h"
#include "chrome/browser/lifetime/application_lifetime.h"
#include "chrome/browser/policy/profile_policy_connector.h"
@@ -168,6 +170,13 @@ bool ArcSessionManager::IsAllowedForProfile(const Profile* profile) {
return false;
}
+ chromeos::UserFlow* user_flow =
+ chromeos::ChromeUserManager::Get()->GetUserFlow(user->GetAccountId());
+ if (!user_flow || !user_flow->CanStartArc()) {
+ VLOG(1) << "ARC is not allowed in the current user flow.";
+ return false;
+ }
+
if (user_manager::UserManager::Get()
->IsCurrentUserCryptohomeDataEphemeral()) {
VLOG(2) << "Users with ephemeral data are not supported in Arc.";
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/easy_unlock/bootstrap_user_flow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698