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

Unified Diff: extensions/common/features/feature.h

Issue 241673002: Support a "policy" extension location in extension features files. At the same (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: format 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 | « extensions/common/features/complex_feature_unittest.cc ('k') | extensions/common/features/feature.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/features/feature.h
diff --git a/extensions/common/features/feature.h b/extensions/common/features/feature.h
index 8afc15d1dce7d7769e90bb340eb6ecf19534a5c6..595f22fbd10b005612f344382fc50a9f2b2cec44 100644
--- a/extensions/common/features/feature.h
+++ b/extensions/common/features/feature.h
@@ -46,12 +46,6 @@ class Feature {
BLESSED_WEB_PAGE_CONTEXT,
};
- // The location required of extensions the feature is supported in.
- enum Location {
- UNSPECIFIED_LOCATION,
- COMPONENT_LOCATION
- };
-
// The platforms the feature is supported in.
enum Platform {
UNSPECIFIED_PLATFORM,
@@ -101,6 +95,8 @@ class Feature {
virtual ~Feature();
// Used by ChromeV8Context until the feature system is fully functional.
+ // TODO(kalman): This is no longer used by ChromeV8Context, so what is the
+ // comment trying to say?
static Availability CreateAvailability(AvailabilityResult result,
const std::string& message);
@@ -112,9 +108,6 @@ class Feature {
// Gets the platform the code is currently running on.
static Platform GetCurrentPlatform();
- // Gets the Feature::Location value for the specified Manifest::Location.
- static Location ConvertLocation(Manifest::Location extension_location);
-
virtual std::set<Context>* GetContexts() = 0;
// Tests whether this is an internal API or not.
@@ -127,17 +120,20 @@ class Feature {
// manifest.
Availability IsAvailableToManifest(const std::string& extension_id,
Manifest::Type type,
- Location location,
+ Manifest::Location location,
int manifest_version) const {
return IsAvailableToManifest(extension_id, type, location, manifest_version,
GetCurrentPlatform());
}
virtual Availability IsAvailableToManifest(const std::string& extension_id,
Manifest::Type type,
- Location location,
+ Manifest::Location location,
int manifest_version,
Platform platform) const = 0;
+ // Returns true if the feature is available to |extension|.
+ Availability IsAvailableToExtension(const Extension* extension);
+
// Returns true if the feature is available to be used in the specified
// extension and context.
Availability IsAvailableToContext(const Extension* extension,
« no previous file with comments | « extensions/common/features/complex_feature_unittest.cc ('k') | extensions/common/features/feature.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698