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

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: 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/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..b5919d4575e204700a2b0e5f07c9520a51931920 100644
--- a/chrome/browser/extensions/test_extension_system.cc
+++ b/chrome/browser/extensions/test_extension_system.cc
@@ -26,6 +26,10 @@
#include "chrome/common/chrome_switches.h"
#include "content/public/browser/browser_thread.h"
+#if defined(OS_CHROMEOS)
+#include "chrome/browser/chromeos/settings/cros_settings.h"
+#endif
+
using content::BrowserThread;
namespace extensions {
@@ -33,6 +37,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() {
« no previous file with comments | « chrome/browser/extensions/test_extension_system.h ('k') | chrome/browser/profiles/profile_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698