| 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 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 NULL); | 459 NULL); |
| 460 } | 460 } |
| 461 | 461 |
| 462 if (container.has_reboot_after_update()) { | 462 if (container.has_reboot_after_update()) { |
| 463 policies->Set(key::kRebootAfterUpdate, | 463 policies->Set(key::kRebootAfterUpdate, |
| 464 POLICY_LEVEL_MANDATORY, | 464 POLICY_LEVEL_MANDATORY, |
| 465 POLICY_SCOPE_MACHINE, | 465 POLICY_SCOPE_MACHINE, |
| 466 Value::CreateBooleanValue(container.reboot_after_update()), | 466 Value::CreateBooleanValue(container.reboot_after_update()), |
| 467 NULL); | 467 NULL); |
| 468 } | 468 } |
| 469 |
| 470 if (container.has_p2p_enabled()) { |
| 471 policies->Set(key::kDeviceAutoUpdateP2PEnabled, |
| 472 POLICY_LEVEL_MANDATORY, |
| 473 POLICY_SCOPE_MACHINE, |
| 474 Value::CreateBooleanValue(container.p2p_enabled()), |
| 475 NULL); |
| 476 } |
| 469 } | 477 } |
| 470 } | 478 } |
| 471 | 479 |
| 472 void DecodeAccessibilityPolicies(const em::ChromeDeviceSettingsProto& policy, | 480 void DecodeAccessibilityPolicies(const em::ChromeDeviceSettingsProto& policy, |
| 473 PolicyMap* policies) { | 481 PolicyMap* policies) { |
| 474 if (policy.has_accessibility_settings()) { | 482 if (policy.has_accessibility_settings()) { |
| 475 const em::AccessibilitySettingsProto& | 483 const em::AccessibilitySettingsProto& |
| 476 container(policy.accessibility_settings()); | 484 container(policy.accessibility_settings()); |
| 477 | 485 |
| 478 if (container.has_login_screen_default_large_cursor_enabled()) { | 486 if (container.has_login_screen_default_large_cursor_enabled()) { |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 674 DecodeLoginPolicies(policy, policies); | 682 DecodeLoginPolicies(policy, policies); |
| 675 DecodeKioskPolicies(policy, policies, install_attributes); | 683 DecodeKioskPolicies(policy, policies, install_attributes); |
| 676 DecodeNetworkPolicies(policy, policies, install_attributes); | 684 DecodeNetworkPolicies(policy, policies, install_attributes); |
| 677 DecodeReportingPolicies(policy, policies); | 685 DecodeReportingPolicies(policy, policies); |
| 678 DecodeAutoUpdatePolicies(policy, policies); | 686 DecodeAutoUpdatePolicies(policy, policies); |
| 679 DecodeAccessibilityPolicies(policy, policies); | 687 DecodeAccessibilityPolicies(policy, policies); |
| 680 DecodeGenericPolicies(policy, policies); | 688 DecodeGenericPolicies(policy, policies); |
| 681 } | 689 } |
| 682 | 690 |
| 683 } // namespace policy | 691 } // namespace policy |
| OLD | NEW |