| 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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 } | 403 } |
| 404 if (container.has_heartbeat_frequency()) { | 404 if (container.has_heartbeat_frequency()) { |
| 405 policies->Set(key::kHeartbeatFrequency, | 405 policies->Set(key::kHeartbeatFrequency, |
| 406 POLICY_LEVEL_MANDATORY, | 406 POLICY_LEVEL_MANDATORY, |
| 407 POLICY_SCOPE_MACHINE, | 407 POLICY_SCOPE_MACHINE, |
| 408 DecodeIntegerValue( | 408 DecodeIntegerValue( |
| 409 container.heartbeat_frequency()).release(), | 409 container.heartbeat_frequency()).release(), |
| 410 NULL); | 410 NULL); |
| 411 } | 411 } |
| 412 } | 412 } |
| 413 |
| 414 if (policy.has_device_log_upload_settings()) { |
| 415 const em::DeviceLogUploadSettingsProto& container( |
| 416 policy.device_log_upload_settings()); |
| 417 if (container.has_log_upload_enabled()) { |
| 418 policies->Set( |
| 419 key::kLogUploadEnabled, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, |
| 420 new base::FundamentalValue(container.log_upload_enabled()), NULL); |
| 421 } |
| 422 } |
| 413 } | 423 } |
| 414 | 424 |
| 415 void DecodeAutoUpdatePolicies(const em::ChromeDeviceSettingsProto& policy, | 425 void DecodeAutoUpdatePolicies(const em::ChromeDeviceSettingsProto& policy, |
| 416 PolicyMap* policies) { | 426 PolicyMap* policies) { |
| 417 if (policy.has_release_channel()) { | 427 if (policy.has_release_channel()) { |
| 418 const em::ReleaseChannelProto& container(policy.release_channel()); | 428 const em::ReleaseChannelProto& container(policy.release_channel()); |
| 419 if (container.has_release_channel()) { | 429 if (container.has_release_channel()) { |
| 420 std::string channel(container.release_channel()); | 430 std::string channel(container.release_channel()); |
| 421 policies->Set(key::kChromeOsReleaseChannel, | 431 policies->Set(key::kChromeOsReleaseChannel, |
| 422 POLICY_LEVEL_MANDATORY, | 432 POLICY_LEVEL_MANDATORY, |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 753 // Decode the various groups of policies. | 763 // Decode the various groups of policies. |
| 754 DecodeLoginPolicies(policy, policies); | 764 DecodeLoginPolicies(policy, policies); |
| 755 DecodeNetworkPolicies(policy, policies); | 765 DecodeNetworkPolicies(policy, policies); |
| 756 DecodeReportingPolicies(policy, policies); | 766 DecodeReportingPolicies(policy, policies); |
| 757 DecodeAutoUpdatePolicies(policy, policies); | 767 DecodeAutoUpdatePolicies(policy, policies); |
| 758 DecodeAccessibilityPolicies(policy, policies); | 768 DecodeAccessibilityPolicies(policy, policies); |
| 759 DecodeGenericPolicies(policy, policies); | 769 DecodeGenericPolicies(policy, policies); |
| 760 } | 770 } |
| 761 | 771 |
| 762 } // namespace policy | 772 } // namespace policy |
| OLD | NEW |