| Index: chrome/browser/chromeos/policy/device_policy_decoder_chromeos.cc
|
| diff --git a/chrome/browser/chromeos/policy/device_policy_decoder_chromeos.cc b/chrome/browser/chromeos/policy/device_policy_decoder_chromeos.cc
|
| index 17f9b9b5065091e90e97e5a6cf4ba7e37ef46642..7bdb1accfe32bdecf04a754ea9b9e0787384aab5 100644
|
| --- a/chrome/browser/chromeos/policy/device_policy_decoder_chromeos.cc
|
| +++ b/chrome/browser/chromeos/policy/device_policy_decoder_chromeos.cc
|
| @@ -8,7 +8,6 @@
|
|
|
| #include "base/logging.h"
|
| #include "base/values.h"
|
| -#include "chrome/browser/chromeos/policy/app_pack_updater.h"
|
| #include "chrome/browser/chromeos/policy/enterprise_install_attributes.h"
|
| #include "chrome/browser/chromeos/policy/proto/chrome_device_policy.pb.h"
|
| #include "chrome/browser/chromeos/settings/cros_settings_names.h"
|
| @@ -122,16 +121,34 @@ void DecodeLoginPolicies(const em::ChromeDeviceSettingsProto& policy,
|
| const RepeatedPtrField<em::DeviceLocalAccountInfoProto>& accounts =
|
| container.account();
|
| if (accounts.size() > 0) {
|
| - ListValue* account_list = new ListValue();
|
| + scoped_ptr<base::ListValue> account_list(new base::ListValue());
|
| RepeatedPtrField<em::DeviceLocalAccountInfoProto>::const_iterator entry;
|
| for (entry = accounts.begin(); entry != accounts.end(); ++entry) {
|
| - if (entry->has_id())
|
| - account_list->AppendString(entry->id());
|
| + scoped_ptr<base::DictionaryValue> entry_dict(
|
| + new base::DictionaryValue());
|
| + if (entry->has_id()) {
|
| + entry_dict->SetStringWithoutPathExpansion(
|
| + chromeos::kAccountsPrefDeviceLocalAccountsKeyId,
|
| + entry->kiosk_app_id());
|
| + }
|
| + entry_dict->SetIntegerWithoutPathExpansion(
|
| + chromeos::kAccountsPrefDeviceLocalAccountsKeyType, entry->type());
|
| + if (entry->has_kiosk_app_id()) {
|
| + entry_dict->SetStringWithoutPathExpansion(
|
| + chromeos::kAccountsPrefDeviceLocalAccountsKeyKioskAppId,
|
| + entry->kiosk_app_id());
|
| + }
|
| + if (entry->has_kiosk_app_update_url()) {
|
| + entry_dict->SetStringWithoutPathExpansion(
|
| + chromeos::kAccountsPrefDeviceLocalAccountsKeyKioskAppUpdateURL,
|
| + entry->kiosk_app_update_url());
|
| + }
|
| + account_list->Append(entry_dict.release());
|
| }
|
| policies->Set(key::kDeviceLocalAccounts,
|
| POLICY_LEVEL_MANDATORY,
|
| POLICY_SCOPE_MACHINE,
|
| - account_list);
|
| + account_list.release());
|
| }
|
| if (container.has_auto_login_id()) {
|
| policies->Set(key::kDeviceLocalAccountAutoLoginId,
|
| @@ -145,6 +162,13 @@ void DecodeLoginPolicies(const em::ChromeDeviceSettingsProto& policy,
|
| POLICY_SCOPE_MACHINE,
|
| DecodeIntegerValue(container.auto_login_delay()));
|
| }
|
| + if (container.has_enable_auto_login_bailout()) {
|
| + policies->Set(key::kDeviceLocalAccountAutoLoginBailoutEnabled,
|
| + POLICY_LEVEL_MANDATORY,
|
| + POLICY_SCOPE_MACHINE,
|
| + Value::CreateBooleanValue(
|
| + container.enable_auto_login_bailout()));
|
| + }
|
| }
|
| }
|
|
|
| @@ -198,8 +222,8 @@ void DecodeKioskPolicies(const em::ChromeDeviceSettingsProto& policy,
|
| const em::AppPackEntryProto& entry(container.app_pack(i));
|
| if (entry.has_extension_id() && entry.has_update_url()) {
|
| base::DictionaryValue* dict = new base::DictionaryValue();
|
| - dict->SetString(AppPackUpdater::kExtensionId, entry.extension_id());
|
| - dict->SetString(AppPackUpdater::kUpdateUrl, entry.update_url());
|
| + dict->SetString(chromeos::kAppPackKeyExtensionId, entry.extension_id());
|
| + dict->SetString(chromeos::kAppPackKeyUpdateUrl, entry.update_url());
|
| app_pack_list->Append(dict);
|
| }
|
| }
|
|
|