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

Unified Diff: chrome/browser/extensions/api/web_navigation/web_navigation_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/web_navigation/web_navigation_api.cc
diff --git a/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc b/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc
index 4855a0f21da36251461b6b31bbfa99c85f59e012..f6ea216147cd91cad3a69bd2d5332e7a0074925f 100644
--- a/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc
+++ b/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc
@@ -762,19 +762,19 @@ void WebNavigationAPI::Shutdown() {
ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this);
}
-void WebNavigationAPI::OnListenerAdded(
- const extensions::EventListenerInfo& details) {
- web_navigation_event_router_.reset(new WebNavigationEventRouter(profile_));
- ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this);
-}
-
static base::LazyInstance<ProfileKeyedAPIFactory<WebNavigationAPI> >
g_factory = LAZY_INSTANCE_INITIALIZER;
-template <>
+// static
ProfileKeyedAPIFactory<WebNavigationAPI>*
-ProfileKeyedAPIFactory<WebNavigationAPI>::GetInstance() {
+WebNavigationAPI::GetFactoryInstance() {
return &g_factory.Get();
}
+void WebNavigationAPI::OnListenerAdded(
+ const extensions::EventListenerInfo& details) {
+ web_navigation_event_router_.reset(new WebNavigationEventRouter(profile_));
+ ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this);
+}
+
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698