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

Unified Diff: chrome/browser/chromeos/policy/device_local_account.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: Rebase Created 5 years, 8 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/policy/device_local_account.cc
diff --git a/chrome/browser/chromeos/policy/device_local_account.cc b/chrome/browser/chromeos/policy/device_local_account.cc
index 80b89b20dbaca5a349ef942ee9122e7f70933703..63c7a14778f00948bb286a471db6b78e375ad8d6 100644
--- a/chrome/browser/chromeos/policy/device_local_account.cc
+++ b/chrome/browser/chromeos/policy/device_local_account.cc
@@ -12,6 +12,7 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/values.h"
+#include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h"
#include "chrome/browser/chromeos/settings/cros_settings.h"
#include "chromeos/login/user_names.h"
#include "chromeos/settings/cros_settings_names.h"
@@ -91,9 +92,8 @@ bool IsDeviceLocalAccountUser(const std::string& user_id,
return true;
}
-void SetDeviceLocalAccounts(
- chromeos::CrosSettings* cros_settings,
- const std::vector<DeviceLocalAccount>& accounts) {
+void SetDeviceLocalAccounts(chromeos::OwnerSettingsServiceChromeOS* service,
+ const std::vector<DeviceLocalAccount>& accounts) {
base::ListValue list;
for (std::vector<DeviceLocalAccount>::const_iterator it = accounts.begin();
it != accounts.end(); ++it) {
@@ -117,7 +117,7 @@ void SetDeviceLocalAccounts(
list.Append(entry.release());
}
- cros_settings->Set(chromeos::kAccountsPrefDeviceLocalAccounts, list);
+ service->Set(chromeos::kAccountsPrefDeviceLocalAccounts, list);
}
std::vector<DeviceLocalAccount> GetDeviceLocalAccounts(

Powered by Google App Engine
This is Rietveld 408576698