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

Unified Diff: chrome/browser/extensions/extension_util.cc

Issue 125573002: Move ExtensionService::GetExtensionById() to ExtensionRegistry (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, add test, get_extension_by_id Created 6 years, 11 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/extensions/extension_service.cc ('k') | chrome/browser/themes/theme_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_util.cc
diff --git a/chrome/browser/extensions/extension_util.cc b/chrome/browser/extensions/extension_util.cc
index f5b731ce967abeb46a72fa186374f61a24de4241..80ccb4536cc695a33dc7515bb734871068206169 100644
--- a/chrome/browser/extensions/extension_util.cc
+++ b/chrome/browser/extensions/extension_util.cc
@@ -12,12 +12,14 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/sync_helper.h"
#include "content/public/browser/site_instance.h"
+#include "extensions/browser/extension_registry.h"
#include "extensions/common/extension.h"
#include "extensions/common/manifest.h"
#include "extensions/common/manifest_handlers/incognito_info.h"
using extensions::Extension;
using extensions::ExtensionPrefs;
+using extensions::ExtensionRegistry;
namespace extension_util {
@@ -134,8 +136,10 @@ bool IsAppLaunchable(const std::string& extension_id,
bool IsAppLaunchableWithoutEnabling(const std::string& extension_id,
const ExtensionService* service) {
- const Extension* launchable_extension = service->GetExtensionById(
- extension_id, ExtensionService::INCLUDE_ENABLED);
+ ExtensionRegistry* registry =
+ ExtensionRegistry::Get(service->GetBrowserContext());
+ const Extension* launchable_extension = registry->GetExtensionById(
+ extension_id, ExtensionRegistry::ENABLED);
return launchable_extension != NULL;
}
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | chrome/browser/themes/theme_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698