Chromium Code Reviews| 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 21effca88e1741d7f087ae3c547c954e774f4945..9aa71eacdadc4821fc5ac23f99b6ac28c08a0102 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_optin_preference_handler.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()); |
|
hidehiko
2016/11/22 03:34:48
Is there a case where user_flow is nullptr even in
yoshiki
2016/11/29 18:08:44
Done.
|
| + if (user_flow && !user_flow->CanStartArc()) { |
| + VLOG(1) << "ARC is prohibited in the currenet user flow."; |
|
Luis Héctor Chávez
2016/11/22 19:12:14
nit: s/currenet/current/. also, consider changing
yoshiki
2016/11/29 18:08:44
Done.
|
| + return false; |
| + } |
| + |
| if (user_manager::UserManager::Get() |
| ->IsCurrentUserCryptohomeDataEphemeral()) { |
| VLOG(2) << "Users with ephemeral data are not supported in Arc."; |