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

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

Issue 14200028: Make CrosSettings and DeviceSettingsService non Lazy instances (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 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/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 664e58cad9efa0e3b92e2ae26887ddde8b1940ec..b2a97858c536f686a3fa889be018b512193e47d3 100644
--- a/chrome/browser/chromeos/settings/device_settings_test_helper.cc
+++ b/chrome/browser/chromeos/settings/device_settings_test_helper.cc
@@ -167,14 +167,16 @@ DeviceSettingsTestHelper::PolicyState::PolicyState()
DeviceSettingsTestHelper::PolicyState::~PolicyState() {}
ScopedDeviceSettingsTestHelper::ScopedDeviceSettingsTestHelper() {
- DeviceSettingsService::Get()->Initialize(this, new MockOwnerKeyUtil());
+ DeviceSettingsService::Initialize();
+ DeviceSettingsService::Get()->SetSessionManager(this, new MockOwnerKeyUtil());
DeviceSettingsService::Get()->Load();
Flush();
}
ScopedDeviceSettingsTestHelper::~ScopedDeviceSettingsTestHelper() {
Flush();
- DeviceSettingsService::Get()->Shutdown();
+ DeviceSettingsService::Get()->UnsetSessionManager();
+ DeviceSettingsService::Shutdown();
}
DeviceSettingsTestBase::DeviceSettingsTestBase()
@@ -193,13 +195,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_.Initialize(&device_settings_test_helper_,
- owner_key_util_);
+ device_settings_service_.SetSessionManager(&device_settings_test_helper_,
+ owner_key_util_);
}
void DeviceSettingsTestBase::TearDown() {
FlushDeviceSettings();
- device_settings_service_.Shutdown();
+ device_settings_service_.UnsetSessionManager();
}
void DeviceSettingsTestBase::FlushDeviceSettings() {
« no previous file with comments | « chrome/browser/chromeos/settings/device_settings_test_helper.h ('k') | chrome/browser/extensions/extension_service_unittest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698