Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(776)

Unified Diff: chrome/browser/chromeos/ownership/fake_owner_settings_service.cc

Issue 1019283004: Switch to direct use of OwnerSettingsServiceChromeOS::Set() in tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
bartfab (slow) 2015/03/31 14:12:40 Nit: #include "chromeos/settings/cros_settings_pro
+ provider->Set(setting, value);
+ return true;
+}
+
} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698