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

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

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/feature.h ('k') | extensions/common/features/simple_feature.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/features/feature.cc
diff --git a/extensions/common/features/feature.cc b/extensions/common/features/feature.cc
index 60f7f88929c345e6b07bdb3c49b190bb767e7fba..e06a44a8727b122aca2f15f01f10c1b84df56759 100644
--- a/extensions/common/features/feature.cc
+++ b/extensions/common/features/feature.cc
@@ -10,6 +10,7 @@
#include "base/lazy_instance.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
+#include "extensions/common/extension.h"
namespace extensions {
@@ -29,19 +30,19 @@ Feature::Platform Feature::GetCurrentPlatform() {
}
// static
-Feature::Location Feature::ConvertLocation(Manifest::Location location) {
- if (location == Manifest::COMPONENT)
- return COMPONENT_LOCATION;
- else
- return UNSPECIFIED_LOCATION;
-}
-
-// static
Feature::Availability Feature::CreateAvailability(AvailabilityResult result,
const std::string& message) {
return Availability(result, message);
}
+Feature::Availability Feature::IsAvailableToExtension(
+ const Extension* extension) {
+ return IsAvailableToManifest(extension->id(),
+ extension->GetType(),
+ extension->location(),
+ extension->manifest_version());
+}
+
Feature::Feature() : no_parent_(false) {}
Feature::~Feature() {}
« no previous file with comments | « extensions/common/features/feature.h ('k') | extensions/common/features/simple_feature.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698