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

Unified Diff: chrome/browser/ui/app_list/app_list_controller_delegate.cc

Issue 1130353010: Remove deprecated ExtensionService::GetInstalledExtension() usage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
Index: chrome/browser/ui/app_list/app_list_controller_delegate.cc
diff --git a/chrome/browser/ui/app_list/app_list_controller_delegate.cc b/chrome/browser/ui/app_list/app_list_controller_delegate.cc
index d9d8ede37e7dfe6d0f40b141b587cac673ed371b..0be437b3ce9348dfd4696d97c82a51901136043d 100644
--- a/chrome/browser/ui/app_list/app_list_controller_delegate.cc
+++ b/chrome/browser/ui/app_list/app_list_controller_delegate.cc
@@ -5,7 +5,6 @@
#include "chrome/browser/ui/app_list/app_list_controller_delegate.h"
#include "base/metrics/histogram.h"
-#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_util.h"
#include "chrome/browser/extensions/install_tracker_factory.h"
#include "chrome/browser/extensions/launch_util.h"
@@ -37,10 +36,9 @@ namespace {
const extensions::Extension* GetExtension(Profile* profile,
const std::string& extension_id) {
- const ExtensionService* service =
- extensions::ExtensionSystem::Get(profile)->extension_service();
- const extensions::Extension* extension =
- service->GetInstalledExtension(extension_id);
+ const ExtensionRegistry* registry = ExtensionRegistry::Get(profile);
+ const extensions::Extension* extension = registry->GetExtensionById(
+ extension_id, extensions::ExtensionRegistry::EVERYTHING);
return extension;
}
@@ -93,11 +91,7 @@ void AppListControllerDelegate::DoShowAppInfoFlow(
Profile* profile,
const std::string& extension_id) {
DCHECK(CanDoShowAppInfoFlow());
- ExtensionService* service =
- extensions::ExtensionSystem::Get(profile)->extension_service();
- DCHECK(service);
- const extensions::Extension* extension = service->GetInstalledExtension(
- extension_id);
+ const extensions::Extension* extension = GetExtension(profile, extension_id);
DCHECK(extension);
OnShowChildDialog();

Powered by Google App Engine
This is Rietveld 408576698