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/callback.h" | 9 #include "base/callback.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 chromeos::kAccountsPrefDeviceLocalAccountsKeyId, | 137 chromeos::kAccountsPrefDeviceLocalAccountsKeyId, |
138 entry->account_id()); | 138 entry->account_id()); |
139 } | 139 } |
140 entry_dict->SetIntegerWithoutPathExpansion( | 140 entry_dict->SetIntegerWithoutPathExpansion( |
141 chromeos::kAccountsPrefDeviceLocalAccountsKeyType, entry->type()); | 141 chromeos::kAccountsPrefDeviceLocalAccountsKeyType, entry->type()); |
142 if (entry->kiosk_app().has_app_id()) { | 142 if (entry->kiosk_app().has_app_id()) { |
143 entry_dict->SetStringWithoutPathExpansion( | 143 entry_dict->SetStringWithoutPathExpansion( |
144 chromeos::kAccountsPrefDeviceLocalAccountsKeyKioskAppId, | 144 chromeos::kAccountsPrefDeviceLocalAccountsKeyKioskAppId, |
145 entry->kiosk_app().app_id()); | 145 entry->kiosk_app().app_id()); |
146 } | 146 } |
147 if (entry->kiosk_app().has_update_url()) { | |
148 entry_dict->SetStringWithoutPathExpansion( | |
149 chromeos::kAccountsPrefDeviceLocalAccountsKeyKioskAppUpdateURL, | |
150 entry->kiosk_app().update_url()); | |
151 } | |
152 } else if (entry->has_deprecated_public_session_id()) { | 147 } else if (entry->has_deprecated_public_session_id()) { |
153 // Deprecated public session specification. | 148 // Deprecated public session specification. |
154 entry_dict->SetStringWithoutPathExpansion( | 149 entry_dict->SetStringWithoutPathExpansion( |
155 chromeos::kAccountsPrefDeviceLocalAccountsKeyId, | 150 chromeos::kAccountsPrefDeviceLocalAccountsKeyId, |
156 entry->deprecated_public_session_id()); | 151 entry->deprecated_public_session_id()); |
157 entry_dict->SetIntegerWithoutPathExpansion( | 152 entry_dict->SetIntegerWithoutPathExpansion( |
158 chromeos::kAccountsPrefDeviceLocalAccountsKeyType, | 153 chromeos::kAccountsPrefDeviceLocalAccountsKeyType, |
159 DeviceLocalAccount::TYPE_PUBLIC_SESSION); | 154 DeviceLocalAccount::TYPE_PUBLIC_SESSION); |
160 } | 155 } |
161 account_list->Append(entry_dict.release()); | 156 account_list->Append(entry_dict.release()); |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 if (value) | 447 if (value) |
453 allowed_connection_types->Append(value); | 448 allowed_connection_types->Append(value); |
454 } | 449 } |
455 policies->Set(key::kDeviceUpdateAllowedConnectionTypes, | 450 policies->Set(key::kDeviceUpdateAllowedConnectionTypes, |
456 POLICY_LEVEL_MANDATORY, | 451 POLICY_LEVEL_MANDATORY, |
457 POLICY_SCOPE_MACHINE, | 452 POLICY_SCOPE_MACHINE, |
458 allowed_connection_types, | 453 allowed_connection_types, |
459 NULL); | 454 NULL); |
460 } | 455 } |
461 | 456 |
| 457 if (container.has_http_downloads_enabled()) { |
| 458 policies->Set( |
| 459 key::kDeviceUpdateHttpDownloadsEnabled, |
| 460 POLICY_LEVEL_MANDATORY, |
| 461 POLICY_SCOPE_MACHINE, |
| 462 Value::CreateBooleanValue(container.http_downloads_enabled()), |
| 463 NULL); |
| 464 } |
| 465 |
462 if (container.has_reboot_after_update()) { | 466 if (container.has_reboot_after_update()) { |
463 policies->Set(key::kRebootAfterUpdate, | 467 policies->Set(key::kRebootAfterUpdate, |
464 POLICY_LEVEL_MANDATORY, | 468 POLICY_LEVEL_MANDATORY, |
465 POLICY_SCOPE_MACHINE, | 469 POLICY_SCOPE_MACHINE, |
466 Value::CreateBooleanValue(container.reboot_after_update()), | 470 Value::CreateBooleanValue(container.reboot_after_update()), |
467 NULL); | 471 NULL); |
468 } | 472 } |
469 | 473 |
470 if (container.has_p2p_enabled()) { | 474 if (container.has_p2p_enabled()) { |
471 policies->Set(key::kDeviceAutoUpdateP2PEnabled, | 475 policies->Set(key::kDeviceAutoUpdateP2PEnabled, |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
682 DecodeLoginPolicies(policy, policies); | 686 DecodeLoginPolicies(policy, policies); |
683 DecodeKioskPolicies(policy, policies, install_attributes); | 687 DecodeKioskPolicies(policy, policies, install_attributes); |
684 DecodeNetworkPolicies(policy, policies, install_attributes); | 688 DecodeNetworkPolicies(policy, policies, install_attributes); |
685 DecodeReportingPolicies(policy, policies); | 689 DecodeReportingPolicies(policy, policies); |
686 DecodeAutoUpdatePolicies(policy, policies); | 690 DecodeAutoUpdatePolicies(policy, policies); |
687 DecodeAccessibilityPolicies(policy, policies); | 691 DecodeAccessibilityPolicies(policy, policies); |
688 DecodeGenericPolicies(policy, policies); | 692 DecodeGenericPolicies(policy, policies); |
689 } | 693 } |
690 | 694 |
691 } // namespace policy | 695 } // namespace policy |
OLD | NEW |