| 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" |
| 11 #include "chrome/browser/chromeos/policy/device_local_account.h" |
| 11 #include "chrome/browser/chromeos/policy/enterprise_install_attributes.h" | 12 #include "chrome/browser/chromeos/policy/enterprise_install_attributes.h" |
| 12 #include "chrome/browser/chromeos/settings/cros_settings_names.h" | 13 #include "chrome/browser/chromeos/settings/cros_settings_names.h" |
| 13 #include "chrome/browser/policy/policy_map.h" | 14 #include "chrome/browser/policy/policy_map.h" |
| 14 #include "chrome/browser/policy/proto/chromeos/chrome_device_policy.pb.h" | 15 #include "chrome/browser/policy/proto/chromeos/chrome_device_policy.pb.h" |
| 15 #include "chromeos/dbus/dbus_thread_manager.h" | 16 #include "chromeos/dbus/dbus_thread_manager.h" |
| 16 #include "chromeos/dbus/update_engine_client.h" | 17 #include "chromeos/dbus/update_engine_client.h" |
| 17 #include "policy/policy_constants.h" | 18 #include "policy/policy_constants.h" |
| 18 #include "third_party/cros_system_api/dbus/service_constants.h" | 19 #include "third_party/cros_system_api/dbus/service_constants.h" |
| 19 | 20 |
| 20 using google::protobuf::RepeatedField; | 21 using google::protobuf::RepeatedField; |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 chromeos::kAccountsPrefDeviceLocalAccountsKeyKioskAppUpdateURL, | 142 chromeos::kAccountsPrefDeviceLocalAccountsKeyKioskAppUpdateURL, |
| 142 entry->kiosk_app().update_url()); | 143 entry->kiosk_app().update_url()); |
| 143 } | 144 } |
| 144 } else if (entry->has_deprecated_public_session_id()) { | 145 } else if (entry->has_deprecated_public_session_id()) { |
| 145 // Deprecated public session specification. | 146 // Deprecated public session specification. |
| 146 entry_dict->SetStringWithoutPathExpansion( | 147 entry_dict->SetStringWithoutPathExpansion( |
| 147 chromeos::kAccountsPrefDeviceLocalAccountsKeyId, | 148 chromeos::kAccountsPrefDeviceLocalAccountsKeyId, |
| 148 entry->deprecated_public_session_id()); | 149 entry->deprecated_public_session_id()); |
| 149 entry_dict->SetIntegerWithoutPathExpansion( | 150 entry_dict->SetIntegerWithoutPathExpansion( |
| 150 chromeos::kAccountsPrefDeviceLocalAccountsKeyType, | 151 chromeos::kAccountsPrefDeviceLocalAccountsKeyType, |
| 151 chromeos::DEVICE_LOCAL_ACCOUNT_TYPE_PUBLIC_SESSION); | 152 DeviceLocalAccount::TYPE_PUBLIC_SESSION); |
| 152 } | 153 } |
| 153 account_list->Append(entry_dict.release()); | 154 account_list->Append(entry_dict.release()); |
| 154 } | 155 } |
| 155 policies->Set(key::kDeviceLocalAccounts, | 156 policies->Set(key::kDeviceLocalAccounts, |
| 156 POLICY_LEVEL_MANDATORY, | 157 POLICY_LEVEL_MANDATORY, |
| 157 POLICY_SCOPE_MACHINE, | 158 POLICY_SCOPE_MACHINE, |
| 158 account_list.release()); | 159 account_list.release()); |
| 159 if (container.has_auto_login_id()) { | 160 if (container.has_auto_login_id()) { |
| 160 policies->Set(key::kDeviceLocalAccountAutoLoginId, | 161 policies->Set(key::kDeviceLocalAccountAutoLoginId, |
| 161 POLICY_LEVEL_MANDATORY, | 162 POLICY_LEVEL_MANDATORY, |
| (...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 // Decode the various groups of policies. | 520 // Decode the various groups of policies. |
| 520 DecodeLoginPolicies(policy, policies); | 521 DecodeLoginPolicies(policy, policies); |
| 521 DecodeKioskPolicies(policy, policies, install_attributes); | 522 DecodeKioskPolicies(policy, policies, install_attributes); |
| 522 DecodeNetworkPolicies(policy, policies, install_attributes); | 523 DecodeNetworkPolicies(policy, policies, install_attributes); |
| 523 DecodeReportingPolicies(policy, policies); | 524 DecodeReportingPolicies(policy, policies); |
| 524 DecodeAutoUpdatePolicies(policy, policies); | 525 DecodeAutoUpdatePolicies(policy, policies); |
| 525 DecodeGenericPolicies(policy, policies); | 526 DecodeGenericPolicies(policy, policies); |
| 526 } | 527 } |
| 527 | 528 |
| 528 } // namespace policy | 529 } // namespace policy |
| OLD | NEW |