diff options
author | satish@chromium.org <satish@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-09 16:42:15 +0000 |
---|---|---|
committer | satish@chromium.org <satish@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-09 16:42:15 +0000 |
commit | fee46a89f493080db0838e2314b4400faeec94f3 (patch) | |
tree | 6e857fcf0b6b548b526c45d24879ad6422d50856 /chrome/browser/extensions/extension_test_api.cc | |
parent | f2d1f61006eac0f8a051fa485b2cffb6b6fa74e0 (diff) | |
download | chromium_src-fee46a89f493080db0838e2314b4400faeec94f3.zip chromium_src-fee46a89f493080db0838e2314b4400faeec94f3.tar.gz chromium_src-fee46a89f493080db0838e2314b4400faeec94f3.tar.bz2 |
This is a continuation of http://codereview.chromium.org/5519016/, adds a new GetInstance() method for remaining files with singleton classes under chrome/browser.
For types declared and used within the same .cc file, I changed them over to LazyInstance<T>.
BUG=65298
TEST=all existing tests should continue to pass.
Review URL: http://codereview.chromium.org/5711001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68739 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_test_api.cc')
-rw-r--r-- | chrome/browser/extensions/extension_test_api.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/chrome/browser/extensions/extension_test_api.cc b/chrome/browser/extensions/extension_test_api.cc index 7afd5eb..104e51b 100644 --- a/chrome/browser/extensions/extension_test_api.cc +++ b/chrome/browser/extensions/extension_test_api.cc @@ -6,6 +6,7 @@ #include <string> +#include "base/singleton.h" #include "chrome/browser/extensions/extensions_service.h" #include "chrome/browser/extensions/extensions_quota_service.h" #include "chrome/browser/profiles/profile.h" @@ -93,17 +94,23 @@ void ExtensionTestSendMessageFunction::Reply(const std::string& message) { // static void ExtensionTestGetConfigFunction::set_test_config_state( DictionaryValue* value) { - TestConfigState* test_config_state = Singleton<TestConfigState>::get(); + TestConfigState* test_config_state = TestConfigState::GetInstance(); test_config_state->set_config_state(value); } ExtensionTestGetConfigFunction::TestConfigState::TestConfigState() : config_state_(NULL) {} +// static +ExtensionTestGetConfigFunction::TestConfigState* +ExtensionTestGetConfigFunction::TestConfigState::GetInstance() { + return Singleton<TestConfigState>::get(); +} + ExtensionTestGetConfigFunction::~ExtensionTestGetConfigFunction() {} bool ExtensionTestGetConfigFunction::RunImpl() { - TestConfigState* test_config_state = Singleton<TestConfigState>::get(); + TestConfigState* test_config_state = TestConfigState::GetInstance(); if (!test_config_state->config_state()) { error_ = kNoTestConfigDataError; |