Chromium Code Reviews| 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 156 if (!profile) { | 156 if (!profile) { |
| 157 VLOG(1) << "ARC is not supported for systems without profile."; | 157 VLOG(1) << "ARC is not supported for systems without profile."; |
| 158 return false; | 158 return false; |
| 159 } | 159 } |
| 160 | 160 |
| 161 if (!chromeos::ProfileHelper::IsPrimaryProfile(profile)) { | 161 if (!chromeos::ProfileHelper::IsPrimaryProfile(profile)) { |
| 162 VLOG(1) << "Non-primary users are not supported in ARC."; | 162 VLOG(1) << "Non-primary users are not supported in ARC."; |
| 163 return false; | 163 return false; |
| 164 } | 164 } |
| 165 | 165 |
| 166 // IsPrimaryProfile can return true for an incognito profile corresponding | |
|
hidehiko
2017/01/11 14:29:42
Note: I'm not very sure if this is intentional beh
| |
| 167 // to the primary profile, but ARC does not support it. | |
| 168 if (profile->IsOffTheRecord()) { | |
| 169 VLOG(1) << "Incognito profile is not supported in ARC."; | |
| 170 return false; | |
| 171 } | |
| 172 | |
| 166 if (profile->IsLegacySupervised()) { | 173 if (profile->IsLegacySupervised()) { |
| 167 VLOG(1) << "Supervised users are not supported in ARC."; | 174 VLOG(1) << "Supervised users are not supported in ARC."; |
| 168 return false; | 175 return false; |
| 169 } | 176 } |
| 170 | 177 |
| 171 user_manager::User const* const user = | 178 user_manager::User const* const user = |
| 172 chromeos::ProfileHelper::Get()->GetUserByProfile(profile); | 179 chromeos::ProfileHelper::Get()->GetUserByProfile(profile); |
| 173 if ((!user || !user->HasGaiaAccount()) && !IsArcKioskMode()) { | 180 if ((!user || !user->HasGaiaAccount()) && !IsArcKioskMode()) { |
| 174 VLOG(1) << "Users without GAIA accounts are not supported in ARC."; | 181 VLOG(1) << "Users without GAIA accounts are not supported in ARC."; |
| 175 return false; | 182 return false; |
| (...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 999 return os << "ACTIVE"; | 1006 return os << "ACTIVE"; |
| 1000 } | 1007 } |
| 1001 | 1008 |
| 1002 // Some compiler reports an error even if all values of an enum-class are | 1009 // Some compiler reports an error even if all values of an enum-class are |
| 1003 // covered indivisually in a switch statement. | 1010 // covered indivisually in a switch statement. |
| 1004 NOTREACHED(); | 1011 NOTREACHED(); |
| 1005 return os; | 1012 return os; |
| 1006 } | 1013 } |
| 1007 | 1014 |
| 1008 } // namespace arc | 1015 } // namespace arc |
| OLD | NEW |