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

Unified Diff: chrome/browser/extensions/api/tabs/tabs_windows_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/tabs/tabs_windows_api.cc
diff --git a/chrome/browser/extensions/api/tabs/tabs_windows_api.cc b/chrome/browser/extensions/api/tabs/tabs_windows_api.cc
index 038451082eda7d7de181c0e209309f9bfeadfa49..24cb81dc078aa63681102dcc572f971252d72315 100644
--- a/chrome/browser/extensions/api/tabs/tabs_windows_api.cc
+++ b/chrome/browser/extensions/api/tabs/tabs_windows_api.cc
@@ -40,19 +40,17 @@ void TabsWindowsAPI::Shutdown() {
ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this);
}
-void TabsWindowsAPI::OnListenerAdded(
- const extensions::EventListenerInfo& details) {
- windows_event_router();
- ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this);
-}
-
static base::LazyInstance<ProfileKeyedAPIFactory<TabsWindowsAPI> >
g_factory = LAZY_INSTANCE_INITIALIZER;
-template <>
-ProfileKeyedAPIFactory<TabsWindowsAPI>*
-ProfileKeyedAPIFactory<TabsWindowsAPI>::GetInstance() {
+ProfileKeyedAPIFactory<TabsWindowsAPI>* TabsWindowsAPI::GetFactoryInstance() {
return &g_factory.Get();
}
+void TabsWindowsAPI::OnListenerAdded(
+ const extensions::EventListenerInfo& details) {
+ windows_event_router();
+ ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this);
+}
+
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698