Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / autocomplete / extension_app_provider.cc
index c0a6c34..f29b991 100644 (file)
@@ -20,6 +20,7 @@
 #include "chrome/browser/ui/webui/ntp/core_app_launcher_handler.h"
 #include "chrome/common/extensions/manifest_handlers/app_launch_info.h"
 #include "content/public/browser/notification_source.h"
+#include "extensions/browser/extension_registry.h"
 #include "extensions/browser/extension_system.h"
 #include "extensions/common/extension.h"
 #include "extensions/common/extension_set.h"
@@ -33,7 +34,8 @@ ExtensionAppProvider::ExtensionAppProvider(
   // Notifications of extensions loading and unloading always come from the
   // non-incognito profile, but we need to see them regardless, as the incognito
   // windows can be affected.
-  registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
+  registrar_.Add(this,
+                 chrome::NOTIFICATION_EXTENSION_LOADED_DEPRECATED,
                  content::Source<Profile>(profile_->GetOriginalProfile()));
   registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNINSTALLED,
                  content::Source<Profile>(profile_->GetOriginalProfile()));
@@ -45,10 +47,9 @@ void ExtensionAppProvider::LaunchAppFromOmnibox(
     const AutocompleteMatch& match,
     Profile* profile,
     WindowOpenDisposition disposition) {
-  ExtensionService* service =
-      extensions::ExtensionSystem::Get(profile)->extension_service();
   const extensions::Extension* extension =
-      service->GetInstalledApp(match.destination_url);
+      extensions::ExtensionRegistry::Get(profile)
+          ->enabled_extensions().GetAppByURL(match.destination_url);
   // While the Omnibox popup is open, the extension can be updated, changing
   // its URL and leaving us with no extension being found. In this case, we
   // ignore the request.