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

Unified Diff: chrome/browser/extensions/api/omnibox/omnibox_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/omnibox/omnibox_api.cc
diff --git a/chrome/browser/extensions/api/omnibox/omnibox_api.cc b/chrome/browser/extensions/api/omnibox/omnibox_api.cc
index 37f125103e6ec613a70be2af3ed6a652c34cc830..806997fab836dcc7841bdd573269bdb357fbe97a 100644
--- a/chrome/browser/extensions/api/omnibox/omnibox_api.cc
+++ b/chrome/browser/extensions/api/omnibox/omnibox_api.cc
@@ -10,7 +10,6 @@
#include "base/string16.h"
#include "base/utf_string_conversions.h"
#include "base/values.h"
-#include "chrome/browser/extensions/api/omnibox/omnibox_api_factory.h"
#include "chrome/browser/extensions/event_router.h"
#include "chrome/browser/extensions/extension_prefs.h"
#include "chrome/browser/extensions/extension_service.h"
@@ -152,12 +151,17 @@ OmniboxAPI::OmniboxAPI(Profile* profile)
OmniboxAPI::~OmniboxAPI() {
}
-void OmniboxAPI::Shutdown() {
+base::LazyInstance<ProfileKeyedAPIFactory<OmniboxAPI> >
+g_factory = LAZY_INSTANCE_INITIALIZER;
+
+// static
+ProfileKeyedAPIFactory<OmniboxAPI>* OmniboxAPI::GetFactoryInstance() {
+ return &g_factory.Get();
}
// static
OmniboxAPI* OmniboxAPI::Get(Profile* profile) {
- return OmniboxAPIFactory::GetForProfile(profile);
+ return ProfileKeyedAPIFactory<OmniboxAPI>::GetForProfile(profile);
}
void OmniboxAPI::Observe(int type,
« no previous file with comments | « chrome/browser/extensions/api/omnibox/omnibox_api.h ('k') | chrome/browser/extensions/api/omnibox/omnibox_api_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698