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

Unified Diff: chrome/browser/extensions/api/cookies/cookies_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/cookies/cookies_api.cc
diff --git a/chrome/browser/extensions/api/cookies/cookies_api.cc b/chrome/browser/extensions/api/cookies/cookies_api.cc
index a0e54ad849ec0d2f176203a89932212a192ec46e..1a34a18919a05353cbe38dc0aca11da7ba966f10 100644
--- a/chrome/browser/extensions/api/cookies/cookies_api.cc
+++ b/chrome/browser/extensions/api/cookies/cookies_api.cc
@@ -556,19 +556,18 @@ void CookiesAPI::Shutdown() {
ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this);
}
-void CookiesAPI::OnListenerAdded(
- const extensions::EventListenerInfo& details) {
- cookies_event_router_.reset(new CookiesEventRouter(profile_));
- ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this);
-}
-
static base::LazyInstance<ProfileKeyedAPIFactory<CookiesAPI> >
g_factory = LAZY_INSTANCE_INITIALIZER;
-template <>
-ProfileKeyedAPIFactory<CookiesAPI>*
-ProfileKeyedAPIFactory<CookiesAPI>::GetInstance() {
+// static
+ProfileKeyedAPIFactory<CookiesAPI>* CookiesAPI::GetFactoryInstance() {
return &g_factory.Get();
}
+void CookiesAPI::OnListenerAdded(
+ const extensions::EventListenerInfo& details) {
+ cookies_event_router_.reset(new CookiesEventRouter(profile_));
+ ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this);
+}
+
} // namespace extensions
« no previous file with comments | « chrome/browser/extensions/api/cookies/cookies_api.h ('k') | chrome/browser/extensions/api/input_ime/input_ime_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698