diff options
author | satish@chromium.org <satish@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-13 08:18:55 +0000 |
---|---|---|
committer | satish@chromium.org <satish@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-13 08:18:55 +0000 |
commit | 8e8bb6d329bdad0efe5bddd5d39e0efe64d9846a (patch) | |
tree | a7425d106d83f1f031516e18ea9600363341fdb8 /chrome/browser/extensions/extension_function_dispatcher.cc | |
parent | 1bc1c69f95dab2c34232a5c8793cf9db51af2386 (diff) | |
download | chromium_src-8e8bb6d329bdad0efe5bddd5d39e0efe64d9846a.zip chromium_src-8e8bb6d329bdad0efe5bddd5d39e0efe64d9846a.tar.gz chromium_src-8e8bb6d329bdad0efe5bddd5d39e0efe64d9846a.tar.bz2 |
Rename all methods accessing Singleton<T> as GetInstance().
This is in preparation to a subsequent CL where Singleton<T> will restrict access to only the type being made singleton.
I also moved pepper::ResourceTracker to a lazy instance since there were too many places in code where this class was being accessed from and this was a smaller change than renaming methods in that case.
BUG=65298
TEST=all existing tests should pass.
Review URL: http://codereview.chromium.org/5685007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68982 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_function_dispatcher.cc')
-rw-r--r-- | chrome/browser/extensions/extension_function_dispatcher.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/chrome/browser/extensions/extension_function_dispatcher.cc b/chrome/browser/extensions/extension_function_dispatcher.cc index ec4b9d5..9d9654c 100644 --- a/chrome/browser/extensions/extension_function_dispatcher.cc +++ b/chrome/browser/extensions/extension_function_dispatcher.cc @@ -75,7 +75,7 @@ ExtensionFunction* NewExtensionFunction() { // create instances of them. class FactoryRegistry { public: - static FactoryRegistry* instance(); + static FactoryRegistry* GetInstance(); FactoryRegistry() { ResetFunctions(); } // Resets all functions to their default values. @@ -102,7 +102,7 @@ class FactoryRegistry { FactoryMap factories_; }; -FactoryRegistry* FactoryRegistry::instance() { +FactoryRegistry* FactoryRegistry::GetInstance() { return Singleton<FactoryRegistry>::get(); } @@ -325,16 +325,16 @@ ExtensionFunction* FactoryRegistry::NewFunction(const std::string& name) { void ExtensionFunctionDispatcher::GetAllFunctionNames( std::vector<std::string>* names) { - FactoryRegistry::instance()->GetAllNames(names); + FactoryRegistry::GetInstance()->GetAllNames(names); } bool ExtensionFunctionDispatcher::OverrideFunction( const std::string& name, ExtensionFunctionFactory factory) { - return FactoryRegistry::instance()->OverrideFunction(name, factory); + return FactoryRegistry::GetInstance()->OverrideFunction(name, factory); } void ExtensionFunctionDispatcher::ResetFunctions() { - FactoryRegistry::instance()->ResetFunctions(); + FactoryRegistry::GetInstance()->ResetFunctions(); } ExtensionFunctionDispatcher* ExtensionFunctionDispatcher::Create( @@ -444,7 +444,7 @@ Browser* ExtensionFunctionDispatcher::GetCurrentBrowser( void ExtensionFunctionDispatcher::HandleRequest( const ViewHostMsg_DomMessage_Params& params) { scoped_refptr<ExtensionFunction> function( - FactoryRegistry::instance()->NewFunction(params.name)); + FactoryRegistry::GetInstance()->NewFunction(params.name)); function->set_dispatcher_peer(peer_); function->set_profile(profile_); function->set_extension_id(extension_id()); |