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

Unified Diff: chrome/browser/chromeos/settings/device_settings_test_helper.cc

Issue 14927015: Translate device-local account IDs to user IDs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed DeviceLocalAccountTest. Created 7 years, 7 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/settings/device_settings_test_helper.cc
diff --git a/chrome/browser/chromeos/settings/device_settings_test_helper.cc b/chrome/browser/chromeos/settings/device_settings_test_helper.cc
index 74f2417fb17cef76fde0216c3d81d49fd9cc7b72..b441a18ea94b3b9c22b5b57143683192b5b14242 100644
--- a/chrome/browser/chromeos/settings/device_settings_test_helper.cc
+++ b/chrome/browser/chromeos/settings/device_settings_test_helper.cc
@@ -186,10 +186,13 @@ DeviceSettingsTestBase::DeviceSettingsTestBase()
: loop_(MessageLoop::TYPE_UI),
ui_thread_(content::BrowserThread::UI, &loop_),
file_thread_(content::BrowserThread::FILE, &loop_),
- owner_key_util_(new MockOwnerKeyUtil()) {}
+ owner_key_util_(new MockOwnerKeyUtil()) {
+ DeviceSettingsService::Initialize();
+}
DeviceSettingsTestBase::~DeviceSettingsTestBase() {
base::RunLoop().RunUntilIdle();
+ DeviceSettingsService::Shutdown();
}
void DeviceSettingsTestBase::SetUp() {
@@ -198,13 +201,13 @@ void DeviceSettingsTestBase::SetUp() {
owner_key_util_->SetPublicKeyFromPrivateKey(device_policy_.signing_key());
device_policy_.Build();
device_settings_test_helper_.set_policy_blob(device_policy_.GetBlob());
- device_settings_service_.SetSessionManager(&device_settings_test_helper_,
- owner_key_util_);
+ DeviceSettingsService::Get()->SetSessionManager(&device_settings_test_helper_,
+ owner_key_util_);
}
void DeviceSettingsTestBase::TearDown() {
FlushDeviceSettings();
- device_settings_service_.UnsetSessionManager();
+ DeviceSettingsService::Get()->UnsetSessionManager();
}
void DeviceSettingsTestBase::FlushDeviceSettings() {
@@ -212,7 +215,7 @@ void DeviceSettingsTestBase::FlushDeviceSettings() {
}
void DeviceSettingsTestBase::ReloadDeviceSettings() {
- device_settings_service_.OwnerKeySet(true);
+ DeviceSettingsService::Get()->OwnerKeySet(true);
FlushDeviceSettings();
}

Powered by Google App Engine
This is Rietveld 408576698