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

Unified Diff: chrome/browser/ui/webui/ntp/core_app_launcher_handler.cc

Issue 218683011: Remove ExtensionService::[Get|Is]InstalledApp() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dc_ces_get_installed_ext_by_url
Patch Set: Created 6 years, 8 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
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc ('k') | extensions/common/extension_set.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc ('k') | extensions/common/extension_set.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698