| 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 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 if (container.has_supervised_users_enabled()) { | 252 if (container.has_supervised_users_enabled()) { |
| 253 base::Value* value = new base::FundamentalValue( | 253 base::Value* value = new base::FundamentalValue( |
| 254 container.supervised_users_enabled()); | 254 container.supervised_users_enabled()); |
| 255 policies->Set(key::kSupervisedUsersEnabled, | 255 policies->Set(key::kSupervisedUsersEnabled, |
| 256 POLICY_LEVEL_MANDATORY, | 256 POLICY_LEVEL_MANDATORY, |
| 257 POLICY_SCOPE_MACHINE, | 257 POLICY_SCOPE_MACHINE, |
| 258 value, | 258 value, |
| 259 NULL); | 259 NULL); |
| 260 } | 260 } |
| 261 } | 261 } |
| 262 |
| 263 if (policy.has_kiosk_virtual_keyboard()) { |
| 264 const em::KioskVirtualKeyboardProto& container( |
| 265 policy.kiosk_virtual_keyboard()); |
| 266 if (container.has_layout()) { |
| 267 policies->Set(key::kKioskVirtualKeyboardLayout, |
| 268 POLICY_LEVEL_MANDATORY, |
| 269 POLICY_SCOPE_MACHINE, |
| 270 new base::StringValue(container.layout()), |
| 271 NULL); |
| 272 } |
| 273 } |
| 262 } | 274 } |
| 263 | 275 |
| 264 void DecodeKioskPolicies(const em::ChromeDeviceSettingsProto& policy, | 276 void DecodeKioskPolicies(const em::ChromeDeviceSettingsProto& policy, |
| 265 PolicyMap* policies, | 277 PolicyMap* policies, |
| 266 EnterpriseInstallAttributes* install_attributes) { | 278 EnterpriseInstallAttributes* install_attributes) { |
| 267 // No policies if this is not KIOSK. | 279 // No policies if this is not KIOSK. |
| 268 if (install_attributes->GetMode() != DEVICE_MODE_RETAIL_KIOSK) | 280 if (install_attributes->GetMode() != DEVICE_MODE_RETAIL_KIOSK) |
| 269 return; | 281 return; |
| 270 | 282 |
| 271 if (policy.has_forced_logout_timeouts()) { | 283 if (policy.has_forced_logout_timeouts()) { |
| (...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 795 DecodeLoginPolicies(policy, policies); | 807 DecodeLoginPolicies(policy, policies); |
| 796 DecodeKioskPolicies(policy, policies, install_attributes); | 808 DecodeKioskPolicies(policy, policies, install_attributes); |
| 797 DecodeNetworkPolicies(policy, policies, install_attributes); | 809 DecodeNetworkPolicies(policy, policies, install_attributes); |
| 798 DecodeReportingPolicies(policy, policies); | 810 DecodeReportingPolicies(policy, policies); |
| 799 DecodeAutoUpdatePolicies(policy, policies); | 811 DecodeAutoUpdatePolicies(policy, policies); |
| 800 DecodeAccessibilityPolicies(policy, policies); | 812 DecodeAccessibilityPolicies(policy, policies); |
| 801 DecodeGenericPolicies(policy, policies); | 813 DecodeGenericPolicies(policy, policies); |
| 802 } | 814 } |
| 803 | 815 |
| 804 } // namespace policy | 816 } // namespace policy |
| OLD | NEW |