Index: chrome/browser/ui/webui/ntp/core_app_launcher_handler.cc |
diff --git a/chrome/browser/ui/webui/ntp/core_app_launcher_handler.cc b/chrome/browser/ui/webui/ntp/core_app_launcher_handler.cc |
index ee9244662246a5d8522548fe60c8d5cd09feb625..53f390c07314cd31cc0a1e425a37b4e419674b87 100644 |
--- a/chrome/browser/ui/webui/ntp/core_app_launcher_handler.cc |
+++ b/chrome/browser/ui/webui/ntp/core_app_launcher_handler.cc |
@@ -6,13 +6,14 @@ |
#include "base/bind.h" |
#include "base/metrics/histogram.h" |
-#include "chrome/browser/extensions/extension_service.h" |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/ui/webui/ntp/app_launcher_handler.h" |
#include "chrome/common/pref_names.h" |
#include "components/user_prefs/pref_registry_syncable.h" |
#include "content/public/browser/web_ui.h" |
+#include "extensions/browser/extension_registry.h" |
#include "extensions/common/extension.h" |
+#include "extensions/common/extension_set.h" |
#include "net/base/escape.h" |
namespace { |
@@ -98,9 +99,10 @@ void CoreAppLauncherHandler::RecordAppLaunchByUrl( |
CHECK(bucket != extension_misc::APP_LAUNCH_BUCKET_INVALID); |
GURL url(net::UnescapeURLComponent(escaped_url, kUnescapeRules)); |
- DCHECK(profile->GetExtensionService()); |
- if (!profile->GetExtensionService()->IsInstalledApp(url)) |
+ if (!extensions::ExtensionRegistry::Get(profile) |
+ ->enabled_extensions().GetAppByURL(url)) { |
return; |
+ } |
RecordAppLaunchType(bucket, extensions::Manifest::TYPE_HOSTED_APP); |
} |