Commit f7471e89 authored by mnissler@chromium.org's avatar mnissler@chromium.org

Remove --disable-local-accounts flag.

This code is stable for a while now, there's no longer any reason to
be able to quickly turn the feature off.

BUG=chromium:350298

Review URL: https://codereview.chromium.org/189163006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255751 0039d316-1c4b-4281-b951-d872f2087c98
parent 631df257
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
#include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
#include "base/command_line.h"
#include "base/files/file_path.h" #include "base/files/file_path.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/message_loop/message_loop_proxy.h" #include "base/message_loop/message_loop_proxy.h"
...@@ -126,21 +125,18 @@ void BrowserPolicyConnectorChromeOS::Init( ...@@ -126,21 +125,18 @@ void BrowserPolicyConnectorChromeOS::Init(
local_state, device_management_service(), status_provider.Pass()); local_state, device_management_service(), status_provider.Pass());
} }
CommandLine* command_line = CommandLine::ForCurrentProcess(); device_local_account_policy_service_.reset(
if (!command_line->HasSwitch(chromeos::switches::kDisableLocalAccounts)) { new DeviceLocalAccountPolicyService(
device_local_account_policy_service_.reset( chromeos::DBusThreadManager::Get()->GetSessionManagerClient(),
new DeviceLocalAccountPolicyService( chromeos::DeviceSettingsService::Get(),
chromeos::DBusThreadManager::Get()->GetSessionManagerClient(), chromeos::CrosSettings::Get(),
chromeos::DeviceSettingsService::Get(), GetBackgroundTaskRunner(),
chromeos::CrosSettings::Get(), GetBackgroundTaskRunner(),
GetBackgroundTaskRunner(), GetBackgroundTaskRunner(),
GetBackgroundTaskRunner(), content::BrowserThread::GetMessageLoopProxyForThread(
GetBackgroundTaskRunner(), content::BrowserThread::IO),
content::BrowserThread::GetMessageLoopProxyForThread( request_context));
content::BrowserThread::IO), device_local_account_policy_service_->Connect(device_management_service());
request_context));
device_local_account_policy_service_->Connect(device_management_service());
}
// request_context is NULL in unit tests. // request_context is NULL in unit tests.
if (request_context && install_attributes_) { if (request_context && install_attributes_) {
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#include "base/bind.h" #include "base/bind.h"
#include "base/bind_helpers.h" #include "base/bind_helpers.h"
#include "base/callback.h" #include "base/callback.h"
#include "base/command_line.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/metrics/histogram.h" #include "base/metrics/histogram.h"
#include "base/prefs/pref_service.h" #include "base/prefs/pref_service.h"
...@@ -488,38 +487,35 @@ void DeviceSettingsProvider::DecodeLoginPolicies( ...@@ -488,38 +487,35 @@ void DeviceSettingsProvider::DecodeLoginPolicies(
new_values_cache->SetValue(kAccountsPrefUsers, list); new_values_cache->SetValue(kAccountsPrefUsers, list);
scoped_ptr<base::ListValue> account_list(new base::ListValue()); scoped_ptr<base::ListValue> account_list(new base::ListValue());
CommandLine* command_line = CommandLine::ForCurrentProcess(); const em::DeviceLocalAccountsProto device_local_accounts_proto =
if (!command_line->HasSwitch(switches::kDisableLocalAccounts)) { policy.device_local_accounts();
const em::DeviceLocalAccountsProto device_local_accounts_proto = const RepeatedPtrField<em::DeviceLocalAccountInfoProto>& accounts =
policy.device_local_accounts(); device_local_accounts_proto.account();
const RepeatedPtrField<em::DeviceLocalAccountInfoProto>& accounts = RepeatedPtrField<em::DeviceLocalAccountInfoProto>::const_iterator entry;
device_local_accounts_proto.account(); for (entry = accounts.begin(); entry != accounts.end(); ++entry) {
RepeatedPtrField<em::DeviceLocalAccountInfoProto>::const_iterator entry; scoped_ptr<base::DictionaryValue> entry_dict(new base::DictionaryValue());
for (entry = accounts.begin(); entry != accounts.end(); ++entry) { if (entry->has_type()) {
scoped_ptr<base::DictionaryValue> entry_dict(new base::DictionaryValue()); if (entry->has_account_id()) {
if (entry->has_type()) { entry_dict->SetStringWithoutPathExpansion(
if (entry->has_account_id()) { kAccountsPrefDeviceLocalAccountsKeyId, entry->account_id());
entry_dict->SetStringWithoutPathExpansion( }
kAccountsPrefDeviceLocalAccountsKeyId, entry->account_id()); entry_dict->SetIntegerWithoutPathExpansion(
} kAccountsPrefDeviceLocalAccountsKeyType, entry->type());
entry_dict->SetIntegerWithoutPathExpansion( if (entry->kiosk_app().has_app_id()) {
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.
entry_dict->SetStringWithoutPathExpansion( entry_dict->SetStringWithoutPathExpansion(
kAccountsPrefDeviceLocalAccountsKeyId, kAccountsPrefDeviceLocalAccountsKeyKioskAppId,
entry->deprecated_public_session_id()); entry->kiosk_app().app_id());
entry_dict->SetIntegerWithoutPathExpansion(
kAccountsPrefDeviceLocalAccountsKeyType,
policy::DeviceLocalAccount::TYPE_PUBLIC_SESSION);
} }
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, new_values_cache->SetValue(kAccountsPrefDeviceLocalAccounts,
account_list.release()); account_list.release());
......
...@@ -43,9 +43,6 @@ const char kDisableEnterpriseUserReporting[] = ...@@ -43,9 +43,6 @@ const char kDisableEnterpriseUserReporting[] =
// Disable Genius App and use the original Help App instead. // Disable Genius App and use the original Help App instead.
const char kDisableGeniusApp[] = "disable-genius-app"; const char kDisableGeniusApp[] = "disable-genius-app";
// Disable policy-configured local accounts.
const char kDisableLocalAccounts[] = "disable-local-accounts";
// Avoid doing expensive animations upon login. // Avoid doing expensive animations upon login.
const char kDisableLoginAnimations[] = "disable-login-animations"; const char kDisableLoginAnimations[] = "disable-login-animations";
......
...@@ -31,7 +31,6 @@ CHROMEOS_EXPORT extern const char kDisableBootAnimation[]; ...@@ -31,7 +31,6 @@ CHROMEOS_EXPORT extern const char kDisableBootAnimation[];
CHROMEOS_EXPORT extern const char kDisableDemoMode[]; CHROMEOS_EXPORT extern const char kDisableDemoMode[];
CHROMEOS_EXPORT extern const char kDisableEnterpriseUserReporting[]; CHROMEOS_EXPORT extern const char kDisableEnterpriseUserReporting[];
CHROMEOS_EXPORT extern const char kDisableGeniusApp[]; CHROMEOS_EXPORT extern const char kDisableGeniusApp[];
CHROMEOS_EXPORT extern const char kDisableLocalAccounts[];
CHROMEOS_EXPORT extern const char kDisableLoginAnimations[]; CHROMEOS_EXPORT extern const char kDisableLoginAnimations[];
CHROMEOS_EXPORT extern const char kDisableNetworkPortalNotification[]; CHROMEOS_EXPORT extern const char kDisableNetworkPortalNotification[];
CHROMEOS_EXPORT extern const char kDisableNewChannelSwitcherUI[]; CHROMEOS_EXPORT extern const char kDisableNewChannelSwitcherUI[];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment