Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Unified Diff: chrome/browser/chromeos/settings/device_settings_provider.cc

Issue 189163006: Remove --disable-local-accounts flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/policy/browser_policy_connector_chromeos.cc ('k') | chromeos/chromeos_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « chrome/browser/chromeos/policy/browser_policy_connector_chromeos.cc ('k') | chromeos/chromeos_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698