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

Unified Diff: chrome/browser/extensions/test_extension_system.cc

Issue 14200028: Make CrosSettings and DeviceSettingsService non Lazy instances (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix LoginUtilsTest 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/extensions/test_extension_system.cc
diff --git a/chrome/browser/extensions/test_extension_system.cc b/chrome/browser/extensions/test_extension_system.cc
index 4efca4fc2086849f68ec9bc727051a21e040fce2..1a183623543101e625e68fe269a18c0314ec907c 100644
--- a/chrome/browser/extensions/test_extension_system.cc
+++ b/chrome/browser/extensions/test_extension_system.cc
@@ -33,6 +33,13 @@ namespace extensions {
TestExtensionSystem::TestExtensionSystem(Profile* profile)
: profile_(profile),
info_map_(new ExtensionInfoMap()) {
+#if defined OS_CHROMEOS
+ // TestExtensionSystem may or may not be created within
+ // TestExtensionEnvironment, so only create a ScopedTestCrosSettings instance
+ // if none has been created.
+ if (!chromeos::CrosSettings::IsInitialized())
+ test_cros_settings_.reset(new chromeos::ScopedTestCrosSettings);
+#endif
}
TestExtensionSystem::~TestExtensionSystem() {

Powered by Google App Engine
This is Rietveld 408576698