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 eb378f0accb1252a2332e91b4e674bf97d2489de..c447efcd481264fced26c4d546b850d68333bbe9 100644 |
--- a/chrome/browser/extensions/api/omnibox/omnibox_api.cc |
+++ b/chrome/browser/extensions/api/omnibox/omnibox_api.cc |
@@ -11,7 +11,6 @@ |
#include "base/strings/utf_string_conversions.h" |
#include "base/values.h" |
#include "chrome/browser/chrome_notification_types.h" |
-#include "chrome/browser/extensions/extension_service.h" |
#include "chrome/browser/extensions/tab_helper.h" |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/search_engines/template_url.h" |
@@ -23,6 +22,8 @@ |
#include "content/public/browser/notification_service.h" |
#include "extensions/browser/event_router.h" |
#include "extensions/browser/extension_prefs.h" |
+#include "extensions/browser/extension_prefs_factory.h" |
+#include "extensions/browser/extension_registry.h" |
#include "extensions/browser/extension_system.h" |
#include "extensions/common/extension.h" |
#include "ui/gfx/image/image.h" |
@@ -57,8 +58,7 @@ static const int kOmniboxIconPaddingRight = 0; |
scoped_ptr<omnibox::SuggestResult> GetOmniboxDefaultSuggestion( |
Profile* profile, |
const std::string& extension_id) { |
- ExtensionPrefs* prefs = |
- ExtensionSystem::Get(profile)->extension_service()->extension_prefs(); |
+ ExtensionPrefs* prefs = ExtensionPrefs::Get(profile); |
scoped_ptr<omnibox::SuggestResult> suggestion; |
const base::DictionaryValue* dict = NULL; |
@@ -77,8 +77,7 @@ bool SetOmniboxDefaultSuggestion( |
Profile* profile, |
const std::string& extension_id, |
const omnibox::DefaultSuggestResult& suggestion) { |
- ExtensionPrefs* prefs = |
- ExtensionSystem::Get(profile)->extension_service()->extension_prefs(); |
+ ExtensionPrefs* prefs = ExtensionPrefs::Get(profile); |
if (!prefs) |
return false; |
@@ -110,7 +109,7 @@ void ExtensionOmniboxEventRouter::OnInputStarted( |
bool ExtensionOmniboxEventRouter::OnInputChanged( |
Profile* profile, const std::string& extension_id, |
const std::string& input, int suggest_id) { |
- if (!extensions::ExtensionSystem::Get(profile)->event_router()-> |
+ if (!ExtensionSystem::Get(profile)->event_router()-> |
ExtensionHasEventListener(extension_id, |
omnibox::OnInputChanged::kEventName)) |
return false; |
@@ -136,9 +135,8 @@ void ExtensionOmniboxEventRouter::OnInputEntered( |
Profile* profile = |
Profile::FromBrowserContext(web_contents->GetBrowserContext()); |
- const Extension* extension = |
- ExtensionSystem::Get(profile)->extension_service()->extensions()-> |
- GetByID(extension_id); |
+ const Extension* extension = ExtensionRegistry::Get(profile)-> |
+ enabled_extensions().GetByID(extension_id); |
CHECK(extension); |
extensions::TabHelper::FromWebContents(web_contents)-> |
active_tab_permission_granter()->GrantIfRequested(extension); |
@@ -279,6 +277,7 @@ void OmniboxAPI::OnTemplateURLsLoaded() { |
template <> |
void ProfileKeyedAPIFactory<OmniboxAPI>::DeclareFactoryDependencies() { |
DependsOn(ExtensionSystemFactory::GetInstance()); |
+ DependsOn(ExtensionPrefsFactory::GetInstance()); |
James Cook
2014/02/07 00:53:02
Good catch.
|
DependsOn(TemplateURLServiceFactory::GetInstance()); |
} |