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 7f89456d9deb2ffabe8b9f6fd5a691f2146c0cc5..e38b877f9cb2ddcb17c9bd2d07321b829d2c9089 100644 |
--- a/chrome/browser/chromeos/settings/device_settings_provider.cc |
+++ b/chrome/browser/chromeos/settings/device_settings_provider.cc |
@@ -7,7 +7,6 @@ |
#include "base/bind.h" |
#include "base/bind_helpers.h" |
#include "base/callback.h" |
-#include "base/command_line.h" |
#include "base/logging.h" |
#include "base/metrics/histogram.h" |
#include "base/prefs/pref_service.h" |
@@ -488,38 +487,35 @@ void DeviceSettingsProvider::DecodeLoginPolicies( |
new_values_cache->SetValue(kAccountsPrefUsers, list); |
scoped_ptr<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 = |
- device_local_accounts_proto.account(); |
- RepeatedPtrField<em::DeviceLocalAccountInfoProto>::const_iterator entry; |
- for (entry = accounts.begin(); entry != accounts.end(); ++entry) { |
- scoped_ptr<base::DictionaryValue> entry_dict(new base::DictionaryValue()); |
- if (entry->has_type()) { |
- if (entry->has_account_id()) { |
- entry_dict->SetStringWithoutPathExpansion( |
- kAccountsPrefDeviceLocalAccountsKeyId, entry->account_id()); |
- } |
- entry_dict->SetIntegerWithoutPathExpansion( |
- kAccountsPrefDeviceLocalAccountsKeyType, entry->type()); |
- if (entry->kiosk_app().has_app_id()) { |
- entry_dict->SetStringWithoutPathExpansion( |
- kAccountsPrefDeviceLocalAccountsKeyKioskAppId, |
- entry->kiosk_app().app_id()); |
- } |
- } else if (entry->has_deprecated_public_session_id()) { |
- // Deprecated public session specification. |
+ const em::DeviceLocalAccountsProto device_local_accounts_proto = |
+ policy.device_local_accounts(); |
+ const RepeatedPtrField<em::DeviceLocalAccountInfoProto>& accounts = |
+ device_local_accounts_proto.account(); |
+ RepeatedPtrField<em::DeviceLocalAccountInfoProto>::const_iterator entry; |
+ for (entry = accounts.begin(); entry != accounts.end(); ++entry) { |
+ scoped_ptr<base::DictionaryValue> entry_dict(new base::DictionaryValue()); |
+ if (entry->has_type()) { |
+ if (entry->has_account_id()) { |
+ entry_dict->SetStringWithoutPathExpansion( |
+ kAccountsPrefDeviceLocalAccountsKeyId, entry->account_id()); |
+ } |
+ entry_dict->SetIntegerWithoutPathExpansion( |
+ kAccountsPrefDeviceLocalAccountsKeyType, entry->type()); |
+ if (entry->kiosk_app().has_app_id()) { |
entry_dict->SetStringWithoutPathExpansion( |
- kAccountsPrefDeviceLocalAccountsKeyId, |
- entry->deprecated_public_session_id()); |
- entry_dict->SetIntegerWithoutPathExpansion( |
- kAccountsPrefDeviceLocalAccountsKeyType, |
- policy::DeviceLocalAccount::TYPE_PUBLIC_SESSION); |
+ kAccountsPrefDeviceLocalAccountsKeyKioskAppId, |
+ entry->kiosk_app().app_id()); |
} |
- account_list->Append(entry_dict.release()); |
+ } else if (entry->has_deprecated_public_session_id()) { |
+ // Deprecated public session specification. |
+ entry_dict->SetStringWithoutPathExpansion( |
+ kAccountsPrefDeviceLocalAccountsKeyId, |
+ entry->deprecated_public_session_id()); |
+ entry_dict->SetIntegerWithoutPathExpansion( |
+ kAccountsPrefDeviceLocalAccountsKeyType, |
+ policy::DeviceLocalAccount::TYPE_PUBLIC_SESSION); |
} |
+ account_list->Append(entry_dict.release()); |
} |
new_values_cache->SetValue(kAccountsPrefDeviceLocalAccounts, |
account_list.release()); |