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

Unified Diff: chrome/browser/extensions/api/processes/processes_api.cc

Issue 11682005: Remove some Profile-keyed factory boilerplate: management omnibox preference push_messaging. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 11 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/api/processes/processes_api.cc
diff --git a/chrome/browser/extensions/api/processes/processes_api.cc b/chrome/browser/extensions/api/processes/processes_api.cc
index b601f3494409035a383bc050385daa671a7193a7..30420513f42353cb75d256ca7eaa4a6790106824 100644
--- a/chrome/browser/extensions/api/processes/processes_api.cc
+++ b/chrome/browser/extensions/api/processes/processes_api.cc
@@ -503,6 +503,14 @@ void ProcessesAPI::Shutdown() {
ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this);
}
+static base::LazyInstance<ProfileKeyedAPIFactory<ProcessesAPI> >
+g_factory = LAZY_INSTANCE_INITIALIZER;
+
+// static
+ProfileKeyedAPIFactory<ProcessesAPI>* ProcessesAPI::GetFactoryInstance() {
+ return &g_factory.Get();
+}
+
// static
ProcessesAPI* ProcessesAPI::Get(Profile* profile) {
return ProfileKeyedAPIFactory<ProcessesAPI>::GetForProfile(profile);
@@ -527,15 +535,6 @@ void ProcessesAPI::OnListenerRemoved(const EventListenerInfo& details) {
processes_event_router()->ListenerRemoved();
}
-static base::LazyInstance<ProfileKeyedAPIFactory<ProcessesAPI> >
-g_factory = LAZY_INSTANCE_INITIALIZER;
-
-template <>
-ProfileKeyedAPIFactory<ProcessesAPI>*
-ProfileKeyedAPIFactory<ProcessesAPI>::GetInstance() {
- return &g_factory.Get();
-}
-
GetProcessIdForTabFunction::GetProcessIdForTabFunction() : tab_id_(-1) {
}
« no previous file with comments | « chrome/browser/extensions/api/processes/processes_api.h ('k') | chrome/browser/extensions/api/profile_keyed_api_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698