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..f36d29c42a21aac4917ec2ba2fdb0b48f27c26af 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" |
@@ -157,7 +156,7 @@ void OmniboxAPI::Shutdown() { |
// static |
OmniboxAPI* OmniboxAPI::Get(Profile* profile) { |
- return OmniboxAPIFactory::GetForProfile(profile); |
+ return ProfileKeyedAPIFactory<OmniboxAPI>::GetForProfile(profile); |
} |
void OmniboxAPI::Observe(int type, |
@@ -215,6 +214,15 @@ gfx::Image OmniboxAPI::GetOmniboxPopupIcon(const std::string& extension_id) { |
return gfx::Image(omnibox_popup_icon_manager_.GetIcon(extension_id)); |
} |
+base::LazyInstance<ProfileKeyedAPIFactory<OmniboxAPI> > |
+g_factory = LAZY_INSTANCE_INITIALIZER; |
+ |
+template <> |
+ProfileKeyedAPIFactory<OmniboxAPI>* |
+ProfileKeyedAPIFactory<OmniboxAPI>::GetInstance() { |
+ return &g_factory.Get(); |
+} |
+ |
bool OmniboxSendSuggestionsFunction::RunImpl() { |
ExtensionOmniboxSuggestions suggestions; |
ListValue* suggestions_value; |