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

Unified Diff: chrome/browser/extensions/extension_service.h

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 | « no previous file | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_service.h
diff --git a/chrome/browser/extensions/extension_service.h b/chrome/browser/extensions/extension_service.h
index 890f171e511d13b26d463b6e2b4b27fc9ca0e9d3..97af000d53c2ed83d3ba606a587e3a36732afd39 100644
--- a/chrome/browser/extensions/extension_service.h
+++ b/chrome/browser/extensions/extension_service.h
@@ -229,33 +229,20 @@ class ExtensionService
virtual const extensions::Extension* GetExtensionById(
const std::string& id, bool include_disabled) const OVERRIDE;
- enum IncludeFlag {
- INCLUDE_NONE = 0,
- INCLUDE_ENABLED = 1 << 0,
- INCLUDE_DISABLED = 1 << 1,
- INCLUDE_TERMINATED = 1 << 2,
- INCLUDE_BLACKLISTED = 1 << 3,
- INCLUDE_EVERYTHING = (1 << 4) - 1,
- };
-
- // Look up an extension by ID, selecting which sets to look in:
- // * extensions() --> INCLUDE_ENABLED
- // * disabled_extensions() --> INCLUDE_DISABLED
- // * terminated_extensions() --> INCLUDE_TERMINATED
- // * blacklisted_extensions() --> INCLUDE_BLACKLISTED
- const extensions::Extension* GetExtensionById(const std::string& id,
- int include_mask) const;
-
// Returns the site of the given |extension_id|. Suitable for use with
// BrowserContext::GetStoragePartitionForSite().
GURL GetSiteForExtensionId(const std::string& extension_id);
// Looks up a terminated (crashed) extension by ID.
+ // DEPRECATED: Replace with:
+ // ExtensionRegistry::GetExtensionById(id, ExtensionRegistry::TERMINATED).
const extensions::Extension*
GetTerminatedExtension(const std::string& id) const;
// Looks up an extension by ID, regardless of whether it's enabled,
// disabled, blacklisted, or terminated.
+ // DEPRECATED: Replace with:
+ // ExtensionRegistry::GetExtensionById(id, ExtensionRegistry::EVERYTHING).
virtual const extensions::Extension* GetInstalledExtension(
const std::string& id) const OVERRIDE;
@@ -439,6 +426,9 @@ class ExtensionService
Profile* profile();
+ // Returns profile_ as a BrowserContext.
+ content::BrowserContext* GetBrowserContext() const;
+
// TODO(skerner): Change to const ExtensionPrefs& extension_prefs() const,
// ExtensionPrefs* mutable_extension_prefs().
extensions::ExtensionPrefs* extension_prefs();
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698