| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chromeos/arc/arc_session_manager.h" | 5 #include "chrome/browser/chromeos/arc/arc_session_manager.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "ash/common/shelf/shelf_delegate.h" | 9 #include "ash/common/shelf/shelf_delegate.h" |
| 10 #include "ash/common/wm_shell.h" | 10 #include "ash/common/wm_shell.h" |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 return false; | 170 return false; |
| 171 } | 171 } |
| 172 | 172 |
| 173 if (profile->IsLegacySupervised()) { | 173 if (profile->IsLegacySupervised()) { |
| 174 VLOG(1) << "Supervised users are not supported in ARC."; | 174 VLOG(1) << "Supervised users are not supported in ARC."; |
| 175 return false; | 175 return false; |
| 176 } | 176 } |
| 177 | 177 |
| 178 user_manager::User const* const user = | 178 user_manager::User const* const user = |
| 179 chromeos::ProfileHelper::Get()->GetUserByProfile(profile); | 179 chromeos::ProfileHelper::Get()->GetUserByProfile(profile); |
| 180 if ((!user || !user->HasGaiaAccount()) && !IsArcKioskMode()) { | 180 if ((!user || !user->HasGaiaAccount()) && !IsArcKioskMode() && |
| 181 !user->IsActiveDirectoryUser()) { |
| 181 VLOG(1) << "Users without GAIA accounts are not supported in ARC."; | 182 VLOG(1) << "Users without GAIA accounts are not supported in ARC."; |
| 182 return false; | 183 return false; |
| 183 } | 184 } |
| 184 | 185 |
| 185 chromeos::UserFlow* user_flow = | 186 chromeos::UserFlow* user_flow = |
| 186 chromeos::ChromeUserManager::Get()->GetUserFlow(user->GetAccountId()); | 187 chromeos::ChromeUserManager::Get()->GetUserFlow(user->GetAccountId()); |
| 187 if (!user_flow || !user_flow->CanStartArc()) { | 188 if (!user_flow || !user_flow->CanStartArc()) { |
| 188 VLOG(1) << "ARC is not allowed in the current user flow."; | 189 VLOG(1) << "ARC is not allowed in the current user flow."; |
| 189 return false; | 190 return false; |
| 190 } | 191 } |
| (...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1006 return os << "ACTIVE"; | 1007 return os << "ACTIVE"; |
| 1007 } | 1008 } |
| 1008 | 1009 |
| 1009 // Some compiler reports an error even if all values of an enum-class are | 1010 // Some compiler reports an error even if all values of an enum-class are |
| 1010 // covered indivisually in a switch statement. | 1011 // covered indivisually in a switch statement. |
| 1011 NOTREACHED(); | 1012 NOTREACHED(); |
| 1012 return os; | 1013 return os; |
| 1013 } | 1014 } |
| 1014 | 1015 |
| 1015 } // namespace arc | 1016 } // namespace arc |
| OLD | NEW |