Index: chrome/browser/chromeos/ownership/fake_owner_settings_service.cc |
diff --git a/chrome/browser/chromeos/ownership/fake_owner_settings_service.cc b/chrome/browser/chromeos/ownership/fake_owner_settings_service.cc |
index b5154475280f7b0328750b6e66fc64ebe8e09a1b..2f071120b7793c504104242a62cf32433e6bad7c 100644 |
--- a/chrome/browser/chromeos/ownership/fake_owner_settings_service.cc |
+++ b/chrome/browser/chromeos/ownership/fake_owner_settings_service.cc |
@@ -4,8 +4,18 @@ |
#include "chrome/browser/chromeos/ownership/fake_owner_settings_service.h" |
+#include "chrome/browser/chromeos/settings/cros_settings.h" |
+#include "components/ownership/mock_owner_key_util.h" |
+ |
namespace chromeos { |
+FakeOwnerSettingsService::FakeOwnerSettingsService(Profile* profile) |
+ : OwnerSettingsServiceChromeOS(nullptr, |
+ profile, |
+ new ownership::MockOwnerKeyUtil()), |
+ set_management_settings_result_(true) { |
+} |
+ |
FakeOwnerSettingsService::FakeOwnerSettingsService( |
Profile* profile, |
const scoped_refptr<ownership::OwnerKeyUtil>& owner_key_util) |
@@ -23,4 +33,11 @@ void FakeOwnerSettingsService::SetManagementSettings( |
callback.Run(set_management_settings_result_); |
} |
+bool FakeOwnerSettingsService::Set(const std::string& setting, |
+ const base::Value& value) { |
+ CrosSettingsProvider* provider = CrosSettings::Get()->GetProvider(setting); |
+ provider->Set(setting, value); |
Mattias Nissler (ping if slow)
2015/03/30 14:45:46
This is not going to mix well with our goal to rem
Ivan Podogov
2015/03/31 08:40:00
As doesn't the direct use of CrosSettingsProvider:
Mattias Nissler (ping if slow)
2015/03/31 08:44:48
Ah, so we had our wires crossed here - I think all
Ivan Podogov
2015/03/31 08:51:12
Hm, this should be very well possible, although it
Mattias Nissler (ping if slow)
2015/03/31 08:56:03
Why would FakeOwnerSettingsService need to write s
Ivan Podogov
2015/03/31 09:01:21
For example, because KioskAppsManager (or KioskApp
Mattias Nissler (ping if slow)
2015/03/31 09:16:09
OwnerSettingsServiceChromeOS writes via DeviceSett
Ivan Podogov
2015/03/31 09:30:08
Well, that's what I was asking in the first place:
Mattias Nissler (ping if slow)
2015/03/31 09:36:01
Ah, sorry for the confusion then. What you suggest
|
+ return true; |
+} |
+ |
} // namespace chromeos |