OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/device_policy_decoder_chromeos.h" | 5 #include "chrome/browser/chromeos/policy/device_policy_decoder_chromeos.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 DecodeIntegerValue(container.auto_login_delay())); | 170 DecodeIntegerValue(container.auto_login_delay())); |
171 } | 171 } |
172 if (container.has_enable_auto_login_bailout()) { | 172 if (container.has_enable_auto_login_bailout()) { |
173 policies->Set(key::kDeviceLocalAccountAutoLoginBailoutEnabled, | 173 policies->Set(key::kDeviceLocalAccountAutoLoginBailoutEnabled, |
174 POLICY_LEVEL_MANDATORY, | 174 POLICY_LEVEL_MANDATORY, |
175 POLICY_SCOPE_MACHINE, | 175 POLICY_SCOPE_MACHINE, |
176 Value::CreateBooleanValue( | 176 Value::CreateBooleanValue( |
177 container.enable_auto_login_bailout())); | 177 container.enable_auto_login_bailout())); |
178 } | 178 } |
179 } | 179 } |
| 180 |
| 181 if (policy.has_locally_managed_users_settings()) { |
| 182 const em::LocallyManagedUsersSettingsProto& container = |
| 183 policy.locally_managed_users_settings(); |
| 184 if (container.has_locally_managed_users_enabled()) { |
| 185 Value* value = Value::CreateBooleanValue( |
| 186 container.locally_managed_users_enabled()); |
| 187 policies->Set(key::kLocallyManagedUsersEnabled, |
| 188 POLICY_LEVEL_MANDATORY, |
| 189 POLICY_SCOPE_MACHINE, |
| 190 value); |
| 191 } |
| 192 } |
180 } | 193 } |
181 | 194 |
182 void DecodeKioskPolicies(const em::ChromeDeviceSettingsProto& policy, | 195 void DecodeKioskPolicies(const em::ChromeDeviceSettingsProto& policy, |
183 PolicyMap* policies, | 196 PolicyMap* policies, |
184 EnterpriseInstallAttributes* install_attributes) { | 197 EnterpriseInstallAttributes* install_attributes) { |
185 // No policies if this is not KIOSK. | 198 // No policies if this is not KIOSK. |
186 if (install_attributes->GetMode() != DEVICE_MODE_RETAIL_KIOSK) | 199 if (install_attributes->GetMode() != DEVICE_MODE_RETAIL_KIOSK) |
187 return; | 200 return; |
188 | 201 |
189 if (policy.has_forced_logout_timeouts()) { | 202 if (policy.has_forced_logout_timeouts()) { |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 // Decode the various groups of policies. | 543 // Decode the various groups of policies. |
531 DecodeLoginPolicies(policy, policies); | 544 DecodeLoginPolicies(policy, policies); |
532 DecodeKioskPolicies(policy, policies, install_attributes); | 545 DecodeKioskPolicies(policy, policies, install_attributes); |
533 DecodeNetworkPolicies(policy, policies, install_attributes); | 546 DecodeNetworkPolicies(policy, policies, install_attributes); |
534 DecodeReportingPolicies(policy, policies); | 547 DecodeReportingPolicies(policy, policies); |
535 DecodeAutoUpdatePolicies(policy, policies); | 548 DecodeAutoUpdatePolicies(policy, policies); |
536 DecodeGenericPolicies(policy, policies); | 549 DecodeGenericPolicies(policy, policies); |
537 } | 550 } |
538 | 551 |
539 } // namespace policy | 552 } // namespace policy |
OLD | NEW |