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/policy/device_policy_cache.h" | 5 #include "chrome/browser/policy/device_policy_cache.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
563 | 563 |
564 if (policy.has_auto_update_settings()) { | 564 if (policy.has_auto_update_settings()) { |
565 const em::AutoUpdateSettingsProto& container(policy.auto_update_settings()); | 565 const em::AutoUpdateSettingsProto& container(policy.auto_update_settings()); |
566 if (container.has_update_disabled()) { | 566 if (container.has_update_disabled()) { |
567 policies->Set(key::kDeviceAutoUpdateDisabled, | 567 policies->Set(key::kDeviceAutoUpdateDisabled, |
568 POLICY_LEVEL_MANDATORY, | 568 POLICY_LEVEL_MANDATORY, |
569 POLICY_SCOPE_MACHINE, | 569 POLICY_SCOPE_MACHINE, |
570 Value::CreateBooleanValue(container.update_disabled())); | 570 Value::CreateBooleanValue(container.update_disabled())); |
571 } | 571 } |
572 } | 572 } |
| 573 |
| 574 if (policy.has_start_up_urls()) { |
| 575 const em::StartUpUrlsProto& container(policy.start_up_urls()); |
| 576 if (container.start_up_urls_size()) { |
| 577 ListValue* urls = new ListValue(); |
| 578 RepeatedPtrField<std::string>::const_iterator entry; |
| 579 for (entry = container.start_up_urls().begin(); |
| 580 entry != container.start_up_urls().end(); |
| 581 ++entry) { |
| 582 urls->Append(Value::CreateStringValue(*entry)); |
| 583 } |
| 584 policies->Set(key::kDeviceStartUpUrls, |
| 585 POLICY_LEVEL_MANDATORY, |
| 586 POLICY_SCOPE_MACHINE, |
| 587 urls); |
| 588 } |
| 589 } |
573 } | 590 } |
574 | 591 |
575 // static | 592 // static |
576 void DevicePolicyCache::DecodeDevicePolicy( | 593 void DevicePolicyCache::DecodeDevicePolicy( |
577 const em::ChromeDeviceSettingsProto& policy, | 594 const em::ChromeDeviceSettingsProto& policy, |
578 PolicyMap* policies) { | 595 PolicyMap* policies) { |
579 // Decode the various groups of policies. | 596 // Decode the various groups of policies. |
580 DecodeLoginPolicies(policy, policies); | 597 DecodeLoginPolicies(policy, policies); |
581 DecodeKioskPolicies(policy, policies); | 598 DecodeKioskPolicies(policy, policies); |
582 DecodeNetworkPolicies(policy, policies); | 599 DecodeNetworkPolicies(policy, policies); |
583 DecodeReportingPolicies(policy, policies); | 600 DecodeReportingPolicies(policy, policies); |
584 DecodeGenericPolicies(policy, policies); | 601 DecodeGenericPolicies(policy, policies); |
585 } | 602 } |
586 | 603 |
587 } // namespace policy | 604 } // namespace policy |
OLD | NEW |