| Index: chrome/browser/chromeos/settings/stub_cros_settings_provider.cc
|
| diff --git a/chrome/browser/chromeos/settings/stub_cros_settings_provider.cc b/chrome/browser/chromeos/settings/stub_cros_settings_provider.cc
|
| index c11e3c306c2b64dcc97e7dfe84979b0c515dc11e..3b6a89a24aa7cb0d33184de3d58a0e566d9acf9f 100644
|
| --- a/chrome/browser/chromeos/settings/stub_cros_settings_provider.cc
|
| +++ b/chrome/browser/chromeos/settings/stub_cros_settings_provider.cc
|
| @@ -37,17 +37,27 @@ const base::Value* StubCrosSettingsProvider::Get(
|
|
|
| CrosSettingsProvider::TrustedStatus
|
| StubCrosSettingsProvider::PrepareTrustedValues(const base::Closure& cb) {
|
| - // We don't have a trusted store so all values are available immediately.
|
| - return TRUSTED;
|
| + return trusted_status_;
|
| }
|
|
|
| bool StubCrosSettingsProvider::HandlesSetting(const std::string& path) const {
|
| return DeviceSettingsProvider::IsDeviceSetting(path);
|
| }
|
|
|
| +void StubCrosSettingsProvider::SetTrustedStatus(TrustedStatus status) {
|
| + trusted_status_ = status;
|
| +}
|
| +
|
| +void StubCrosSettingsProvider::SetCurrentUserIsOwner(bool owner) {
|
| + current_user_is_owner_ = owner;
|
| +}
|
| +
|
| void StubCrosSettingsProvider::DoSet(const std::string& path,
|
| const base::Value& value) {
|
| - values_.SetValue(path, value.DeepCopy());
|
| + if (current_user_is_owner_)
|
| + values_.SetValue(path, value.DeepCopy());
|
| + else
|
| + LOG(WARNING) << "Changing settings from non-owner, setting=" << path;
|
| NotifyObservers(path);
|
| }
|
|
|
|
|