Index: chrome/browser/chromeos/settings/device_settings_provider.cc |
diff --git a/chrome/browser/chromeos/settings/device_settings_provider.cc b/chrome/browser/chromeos/settings/device_settings_provider.cc |
index f60f5445fc60662b41b5d35e859f25362091d5d2..99bb894f9354888b470a14d867e79c9885ae9b6f 100644 |
--- a/chrome/browser/chromeos/settings/device_settings_provider.cc |
+++ b/chrome/browser/chromeos/settings/device_settings_provider.cc |
@@ -44,6 +44,8 @@ const char* kKnownSettings[] = { |
kAccountsPrefShowUserNamesOnSignIn, |
kAccountsPrefUsers, |
kAccountsPrefDeviceLocalAccounts, |
+ kAccountsPrefDeviceLocalAccountAutoLoginId, |
+ kAccountsPrefDeviceLocalAccountAutoLoginDelay, |
kAppPack, |
kDeviceOwner, |
kIdleLogoutTimeout, |
@@ -232,6 +234,22 @@ void DeviceSettingsProvider::SetInPolicy() { |
} else { |
NOTREACHED(); |
} |
+ } else if (prop == kAccountsPrefDeviceLocalAccountAutoLoginId) { |
+ em::DeviceLocalAccountsProto* device_local_accounts = |
+ device_settings_.mutable_device_local_accounts(); |
+ std::string id; |
+ if (value->GetAsString(&id)) |
+ device_local_accounts->set_auto_login_id(id); |
+ else |
+ NOTREACHED(); |
+ } else if (prop == kAccountsPrefDeviceLocalAccountAutoLoginDelay) { |
+ em::DeviceLocalAccountsProto* device_local_accounts = |
+ device_settings_.mutable_device_local_accounts(); |
+ int timer; |
+ if (value->GetAsInteger(&timer)) |
+ device_local_accounts->set_auto_login_delay(timer); |
+ else |
+ NOTREACHED(); |
} else if (prop == kSignedDataRoamingEnabled) { |
em::DataRoamingEnabledProto* roam = |
device_settings_.mutable_data_roaming_enabled(); |
@@ -386,13 +404,25 @@ void DeviceSettingsProvider::DecodeLoginPolicies( |
base::ListValue* account_list = new base::ListValue(); |
CommandLine* command_line = CommandLine::ForCurrentProcess(); |
if (!command_line->HasSwitch(switches::kDisableLocalAccounts)) { |
+ const em::DeviceLocalAccountsProto device_local_accounts_proto = |
+ policy.device_local_accounts(); |
const RepeatedPtrField<em::DeviceLocalAccountInfoProto>& accounts = |
- policy.device_local_accounts().account(); |
+ device_local_accounts_proto.account(); |
RepeatedPtrField<em::DeviceLocalAccountInfoProto>::const_iterator entry; |
for (entry = accounts.begin(); entry != accounts.end(); ++entry) { |
if (entry->has_id()) |
account_list->AppendString(entry->id()); |
} |
+ if (device_local_accounts_proto.has_auto_login_id()) { |
+ new_values_cache->SetString( |
+ kAccountsPrefDeviceLocalAccountAutoLoginId, |
+ device_local_accounts_proto.auto_login_id()); |
+ } |
+ if (device_local_accounts_proto.has_auto_login_delay()) { |
+ new_values_cache->SetInteger( |
+ kAccountsPrefDeviceLocalAccountAutoLoginDelay, |
+ device_local_accounts_proto.auto_login_delay()); |
+ } |
} |
new_values_cache->SetValue(kAccountsPrefDeviceLocalAccounts, account_list); |
} |