Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/policy/user_policy_manager_factory_chromeos.h" | 5 #include "chrome/browser/chromeos/policy/user_policy_manager_factory_chromeos.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 169 if (user->IsSupervised() || | 169 if (user->IsSupervised() || |
| 170 BrowserPolicyConnector::IsNonEnterpriseUser(account_id.GetUserEmail())) { | 170 BrowserPolicyConnector::IsNonEnterpriseUser(account_id.GetUserEmail())) { |
| 171 return {}; | 171 return {}; |
| 172 } | 172 } |
| 173 | 173 |
| 174 policy::BrowserPolicyConnectorChromeOS* connector = | 174 policy::BrowserPolicyConnectorChromeOS* connector = |
| 175 g_browser_process->platform_part()->browser_policy_connector_chromeos(); | 175 g_browser_process->platform_part()->browser_policy_connector_chromeos(); |
| 176 bool is_active_directory = false; | 176 bool is_active_directory = false; |
| 177 switch (account_id.GetAccountType()) { | 177 switch (account_id.GetAccountType()) { |
| 178 case AccountType::UNKNOWN: | 178 case AccountType::UNKNOWN: |
| 179 // At the time of login, the account type must be well-defined. | |
| 180 CHECK(false); | |
|
Andrew T Wilson (Slow)
2017/05/18 15:26:03
Is CHECK the right thing here, nor AttemptUserExit
Thiemo Nagel
2017/05/18 16:00:24
I guess AttemptUserExit() is just as good, except
| |
| 181 break; | |
| 179 case AccountType::GOOGLE: | 182 case AccountType::GOOGLE: |
| 180 // TODO(tnagel): Return nullptr for unknown accounts once AccountId | |
| 181 // migration is finished. | |
| 182 if (!user->HasGaiaAccount()) { | 183 if (!user->HasGaiaAccount()) { |
| 183 return {}; | 184 return {}; |
| 184 } | 185 } |
| 185 is_active_directory = false; | 186 is_active_directory = false; |
| 186 break; | 187 break; |
| 187 case AccountType::ACTIVE_DIRECTORY: | 188 case AccountType::ACTIVE_DIRECTORY: |
| 188 // Active Directory users only exist on devices whose install attributes | 189 // Active Directory users only exist on devices whose install attributes |
| 189 // are locked into Active Directory mode. | 190 // are locked into Active Directory mode. |
| 190 CHECK(connector->GetInstallAttributes()->IsActiveDirectoryManaged()); | 191 CHECK(connector->GetInstallAttributes()->IsActiveDirectoryManaged()); |
| 191 is_active_directory = true; | 192 is_active_directory = true; |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 321 | 322 |
| 322 bool UserPolicyManagerFactoryChromeOS::HasTestingFactory( | 323 bool UserPolicyManagerFactoryChromeOS::HasTestingFactory( |
| 323 content::BrowserContext* context) { | 324 content::BrowserContext* context) { |
| 324 return false; | 325 return false; |
| 325 } | 326 } |
| 326 | 327 |
| 327 void UserPolicyManagerFactoryChromeOS::CreateServiceNow( | 328 void UserPolicyManagerFactoryChromeOS::CreateServiceNow( |
| 328 content::BrowserContext* context) {} | 329 content::BrowserContext* context) {} |
| 329 | 330 |
| 330 } // namespace policy | 331 } // namespace policy |
| OLD | NEW |