summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/settings
diff options
context:
space:
mode:
authorbartfab@chromium.org <bartfab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-04 12:18:13 +0000
committerbartfab@chromium.org <bartfab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-04 12:18:13 +0000
commit364aaef8112e73e370b759e7a45bb0bd6164ada1 (patch)
treecdf620c676c41b8ce9c3a7fbaba76fe9b460b485 /chrome/browser/chromeos/settings
parentcec80c3dcaae5c863404eb508b43da456ede17c7 (diff)
downloadchromium_src-364aaef8112e73e370b759e7a45bb0bd6164ada1.zip
chromium_src-364aaef8112e73e370b759e7a45bb0bd6164ada1.tar.gz
chromium_src-364aaef8112e73e370b759e7a45bb0bd6164ada1.tar.bz2
Add public accounts to UserManager
This is a re-land of CL 11419184: This CL extends the UserManager to handle public accounts defined through policy. User pods are dynamically added and removed when the list of public accounts in policy changes. Any data belonging to obsolete accounts is also removed, taking care not to remove it prematurely if a user is currently logged into the account. The CL also makes the user list handling more robust by checking for duplicate entries in the user list prefs and logging these as errors. The pods added for public accounts are not functional yet. The login flow for public accounts will be the topic of another CL. BUG=158509,163690 Review URL: https://chromiumcodereview.appspot.com/11411314 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170943 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/settings')
-rw-r--r--chrome/browser/chromeos/settings/device_settings_service.cc3
-rw-r--r--chrome/browser/chromeos/settings/stub_cros_settings_provider.cc2
2 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/chromeos/settings/device_settings_service.cc b/chrome/browser/chromeos/settings/device_settings_service.cc
index fb1638d..ebaf0c9 100644
--- a/chrome/browser/chromeos/settings/device_settings_service.cc
+++ b/chrome/browser/chromeos/settings/device_settings_service.cc
@@ -85,7 +85,8 @@ void DeviceSettingsService::Shutdown() {
pending_operations_.end());
pending_operations_.clear();
- session_manager_client_->RemoveObserver(this);
+ if (session_manager_client_)
+ session_manager_client_->RemoveObserver(this);
session_manager_client_ = NULL;
owner_key_util_ = NULL;
}
diff --git a/chrome/browser/chromeos/settings/stub_cros_settings_provider.cc b/chrome/browser/chromeos/settings/stub_cros_settings_provider.cc
index f0a49f8..d957bdd 100644
--- a/chrome/browser/chromeos/settings/stub_cros_settings_provider.cc
+++ b/chrome/browser/chromeos/settings/stub_cros_settings_provider.cc
@@ -20,6 +20,7 @@ const char* kHandledSettings[] = {
kAccountsPrefShowUserNamesOnSignIn,
kAccountsPrefUsers,
kAccountsPrefEphemeralUsersEnabled,
+ kAccountsPrefDeviceLocalAccounts,
kDeviceOwner,
kPolicyMissingMitigationMode,
kReleaseChannel,
@@ -84,6 +85,7 @@ void StubCrosSettingsProvider::SetDefaults() {
values_.SetBoolean(kAccountsPrefAllowGuest, true);
values_.SetBoolean(kAccountsPrefAllowNewUser, true);
values_.SetBoolean(kAccountsPrefShowUserNamesOnSignIn, true);
+ values_.SetValue(kAccountsPrefDeviceLocalAccounts, new ListValue);
// |kDeviceOwner| will be set to the logged-in user by |UserManager|.
}