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

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

Issue 5685007: Rename all methods accessing Singleton<T> as GetInstance(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 10 years 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/extension_function_dispatcher.cc
diff --git a/chrome/browser/extensions/extension_function_dispatcher.cc b/chrome/browser/extensions/extension_function_dispatcher.cc
index ec4b9d54b0aa1920e773623e47bfa7fdedbf0218..9d9654c3e1cc1598811af85b0a955b411ff4f83e 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());
« no previous file with comments | « chrome/browser/extensions/extension_bookmarks_module.cc ('k') | chrome/browser/extensions/extension_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698