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 @@
#include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/logging.h"
#include "base/message_loop/message_loop_proxy.h"
......@@ -126,21 +125,18 @@ void BrowserPolicyConnectorChromeOS::Init(
local_state, device_management_service(), status_provider.Pass());
}
CommandLine* command_line = CommandLine::ForCurrentProcess();
if (!command_line->HasSwitch(chromeos::switches::kDisableLocalAccounts)) {
device_local_account_policy_service_.reset(
new DeviceLocalAccountPolicyService(
chromeos::DBusThreadManager::Get()->GetSessionManagerClient(),
chromeos::DeviceSettingsService::Get(),
chromeos::CrosSettings::Get(),
GetBackgroundTaskRunner(),
GetBackgroundTaskRunner(),
GetBackgroundTaskRunner(),
content::BrowserThread::GetMessageLoopProxyForThread(
content::BrowserThread::IO),
request_context));
device_local_account_policy_service_->Connect(device_management_service());
}
device_local_account_policy_service_.reset(
new DeviceLocalAccountPolicyService(
chromeos::DBusThreadManager::Get()->GetSessionManagerClient(),
chromeos::DeviceSettingsService::Get(),
chromeos::CrosSettings::Get(),
GetBackgroundTaskRunner(),
GetBackgroundTaskRunner(),
GetBackgroundTaskRunner(),
content::BrowserThread::GetMessageLoopProxyForThread(
content::BrowserThread::IO),
request_context));
device_local_account_policy_service_->Connect(device_management_service());
// request_context is NULL in unit tests.
if (request_context && install_attributes_) {
......
......@@ -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());
......
......@@ -43,9 +43,6 @@ const char kDisableEnterpriseUserReporting[] =
// Disable Genius App and use the original Help App instead.
const char kDisableGeniusApp[] = "disable-genius-app";
// Disable policy-configured local accounts.
const char kDisableLocalAccounts[] = "disable-local-accounts";
// Avoid doing expensive animations upon login.
const char kDisableLoginAnimations[] = "disable-login-animations";
......
......@@ -31,7 +31,6 @@ CHROMEOS_EXPORT extern const char kDisableBootAnimation[];
CHROMEOS_EXPORT extern const char kDisableDemoMode[];
CHROMEOS_EXPORT extern const char kDisableEnterpriseUserReporting[];
CHROMEOS_EXPORT extern const char kDisableGeniusApp[];
CHROMEOS_EXPORT extern const char kDisableLocalAccounts[];
CHROMEOS_EXPORT extern const char kDisableLoginAnimations[];
CHROMEOS_EXPORT extern const char kDisableNetworkPortalNotification[];
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