| 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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 case AccountType::UNKNOWN: | 178 case AccountType::UNKNOWN: |
| 179 case AccountType::GOOGLE: | 179 case AccountType::GOOGLE: |
| 180 // TODO(tnagel): Return nullptr for unknown accounts once AccountId | 180 // TODO(tnagel): Return nullptr for unknown accounts once AccountId |
| 181 // migration is finished. | 181 // migration is finished. |
| 182 if (!user->HasGaiaAccount()) { | 182 if (!user->HasGaiaAccount()) { |
| 183 return {}; | 183 return {}; |
| 184 } | 184 } |
| 185 is_active_directory = false; | 185 is_active_directory = false; |
| 186 break; | 186 break; |
| 187 case AccountType::ACTIVE_DIRECTORY: | 187 case AccountType::ACTIVE_DIRECTORY: |
| 188 // Ensure install attributes are locked into Active Directory mode before | 188 // Active Directory users only exist on devices whose install attributes |
| 189 // allowing Active Directory policy which is not signed. | 189 // are locked into Active Directory mode. |
| 190 if (!connector->GetInstallAttributes()->IsActiveDirectoryManaged()) { | 190 CHECK(connector->GetInstallAttributes()->IsActiveDirectoryManaged()); |
| 191 return {}; | |
| 192 } | |
| 193 is_active_directory = true; | 191 is_active_directory = true; |
| 194 break; | 192 break; |
| 195 } | 193 } |
| 196 | 194 |
| 197 const bool is_browser_restart = | 195 const bool is_browser_restart = |
| 198 command_line->HasSwitch(chromeos::switches::kLoginUser); | 196 command_line->HasSwitch(chromeos::switches::kLoginUser); |
| 199 const user_manager::UserManager* const user_manager = | 197 const user_manager::UserManager* const user_manager = |
| 200 user_manager::UserManager::Get(); | 198 user_manager::UserManager::Get(); |
| 201 | 199 |
| 202 // We want to block for policy if the session has never been initialized | 200 // We want to block for policy if the session has never been initialized |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 | 321 |
| 324 bool UserPolicyManagerFactoryChromeOS::HasTestingFactory( | 322 bool UserPolicyManagerFactoryChromeOS::HasTestingFactory( |
| 325 content::BrowserContext* context) { | 323 content::BrowserContext* context) { |
| 326 return false; | 324 return false; |
| 327 } | 325 } |
| 328 | 326 |
| 329 void UserPolicyManagerFactoryChromeOS::CreateServiceNow( | 327 void UserPolicyManagerFactoryChromeOS::CreateServiceNow( |
| 330 content::BrowserContext* context) {} | 328 content::BrowserContext* context) {} |
| 331 | 329 |
| 332 } // namespace policy | 330 } // namespace policy |
| OLD | NEW |