OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/chromeos/settings/stub_cros_settings_provider.h" | 5 #include "chrome/browser/chromeos/settings/stub_cros_settings_provider.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "chrome/browser/chromeos/login/user_manager.h" | 9 #include "chrome/browser/chromeos/login/user_manager.h" |
10 #include "chrome/browser/chromeos/settings/cros_settings.h" | 10 #include "chrome/browser/chromeos/settings/cros_settings.h" |
11 #include "chrome/browser/chromeos/settings/cros_settings_names.h" | 11 #include "chrome/browser/chromeos/settings/cros_settings_names.h" |
12 | 12 |
13 namespace chromeos { | 13 namespace chromeos { |
14 | 14 |
15 namespace { | 15 namespace { |
16 | 16 |
17 const char* kHandledSettings[] = { | 17 const char* kHandledSettings[] = { |
18 kAccountsPrefAllowGuest, | 18 kAccountsPrefAllowGuest, |
19 kAccountsPrefAllowNewUser, | 19 kAccountsPrefAllowNewUser, |
20 kAccountsPrefShowUserNamesOnSignIn, | 20 kAccountsPrefShowUserNamesOnSignIn, |
21 kAccountsPrefUsers, | 21 kAccountsPrefUsers, |
22 kAccountsPrefEphemeralUsersEnabled, | 22 kAccountsPrefEphemeralUsersEnabled, |
| 23 kAccountsPrefDeviceLocalAccounts, |
23 kDeviceOwner, | 24 kDeviceOwner, |
24 kPolicyMissingMitigationMode, | 25 kPolicyMissingMitigationMode, |
25 kReleaseChannel, | 26 kReleaseChannel, |
26 kReportDeviceVersionInfo, | 27 kReportDeviceVersionInfo, |
27 kReportDeviceActivityTimes, | 28 kReportDeviceActivityTimes, |
28 kReportDeviceBootMode, | 29 kReportDeviceBootMode, |
29 kReportDeviceLocation, | 30 kReportDeviceLocation, |
30 kSettingProxyEverywhere, | 31 kSettingProxyEverywhere, |
31 kSignedDataRoamingEnabled, | 32 kSignedDataRoamingEnabled, |
32 kStatsReportingPref, | 33 kStatsReportingPref, |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 void StubCrosSettingsProvider::DoSet(const std::string& path, | 78 void StubCrosSettingsProvider::DoSet(const std::string& path, |
78 const base::Value& value) { | 79 const base::Value& value) { |
79 values_.SetValue(path, value.DeepCopy()); | 80 values_.SetValue(path, value.DeepCopy()); |
80 NotifyObservers(path); | 81 NotifyObservers(path); |
81 } | 82 } |
82 | 83 |
83 void StubCrosSettingsProvider::SetDefaults() { | 84 void StubCrosSettingsProvider::SetDefaults() { |
84 values_.SetBoolean(kAccountsPrefAllowGuest, true); | 85 values_.SetBoolean(kAccountsPrefAllowGuest, true); |
85 values_.SetBoolean(kAccountsPrefAllowNewUser, true); | 86 values_.SetBoolean(kAccountsPrefAllowNewUser, true); |
86 values_.SetBoolean(kAccountsPrefShowUserNamesOnSignIn, true); | 87 values_.SetBoolean(kAccountsPrefShowUserNamesOnSignIn, true); |
| 88 values_.SetValue(kAccountsPrefDeviceLocalAccounts, new ListValue); |
87 // |kDeviceOwner| will be set to the logged-in user by |UserManager|. | 89 // |kDeviceOwner| will be set to the logged-in user by |UserManager|. |
88 } | 90 } |
89 | 91 |
90 } // namespace chromeos | 92 } // namespace chromeos |
OLD | NEW |