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/logging.h" | 9 #include "base/logging.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 entry != container.flags().end(); | 466 entry != container.flags().end(); |
467 ++entry) { | 467 ++entry) { |
468 flags->Append(Value::CreateStringValue(*entry)); | 468 flags->Append(Value::CreateStringValue(*entry)); |
469 } | 469 } |
470 policies->Set(key::kDeviceStartUpFlags, | 470 policies->Set(key::kDeviceStartUpFlags, |
471 POLICY_LEVEL_MANDATORY, | 471 POLICY_LEVEL_MANDATORY, |
472 POLICY_SCOPE_MACHINE, | 472 POLICY_SCOPE_MACHINE, |
473 flags); | 473 flags); |
474 } | 474 } |
475 } | 475 } |
| 476 |
| 477 if (policy.has_variations_parameter()) { |
| 478 if (policy.variations_parameter().has_parameter()) { |
| 479 policies->Set(key::kDeviceVariationsRestrictParameter, |
| 480 POLICY_LEVEL_MANDATORY, |
| 481 POLICY_SCOPE_MACHINE, |
| 482 Value::CreateStringValue( |
| 483 policy.variations_parameter().parameter())); |
| 484 } |
| 485 } |
476 } | 486 } |
477 | 487 |
478 } // namespace | 488 } // namespace |
479 | 489 |
480 void DecodeDevicePolicy(const em::ChromeDeviceSettingsProto& policy, | 490 void DecodeDevicePolicy(const em::ChromeDeviceSettingsProto& policy, |
481 PolicyMap* policies, | 491 PolicyMap* policies, |
482 EnterpriseInstallAttributes* install_attributes) { | 492 EnterpriseInstallAttributes* install_attributes) { |
483 // Decode the various groups of policies. | 493 // Decode the various groups of policies. |
484 DecodeLoginPolicies(policy, policies); | 494 DecodeLoginPolicies(policy, policies); |
485 DecodeKioskPolicies(policy, policies, install_attributes); | 495 DecodeKioskPolicies(policy, policies, install_attributes); |
486 DecodeNetworkPolicies(policy, policies, install_attributes); | 496 DecodeNetworkPolicies(policy, policies, install_attributes); |
487 DecodeReportingPolicies(policy, policies); | 497 DecodeReportingPolicies(policy, policies); |
488 DecodeAutoUpdatePolicies(policy, policies); | 498 DecodeAutoUpdatePolicies(policy, policies); |
489 DecodeGenericPolicies(policy, policies); | 499 DecodeGenericPolicies(policy, policies); |
490 } | 500 } |
491 | 501 |
492 } // namespace policy | 502 } // namespace policy |
OLD | NEW |