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

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

Issue 2151583003: [Extensions] Add extension feature generation code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add GYP support Created 4 years, 5 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: extensions/common/features/simple_feature.cc
diff --git a/extensions/common/features/simple_feature.cc b/extensions/common/features/simple_feature.cc
index b4a39198bcd62498e6f5c0ab5ee210556a1b7227..c74b1a30a75ee7c9c111b92c5d2e8762c85339a0 100644
--- a/extensions/common/features/simple_feature.cc
+++ b/extensions/common/features/simple_feature.cc
@@ -310,7 +310,8 @@ SimpleFeature::SimpleFeature()
: location_(UNSPECIFIED_LOCATION),
min_manifest_version_(0),
max_manifest_version_(0),
- component_extensions_auto_granted_(true) {}
+ component_extensions_auto_granted_(true),
+ is_internal_(false) {}
SimpleFeature::~SimpleFeature() {}
@@ -583,7 +584,7 @@ Feature::Availability SimpleFeature::CreateAvailability(
}
bool SimpleFeature::IsInternal() const {
- return false;
+ return is_internal_;
}
bool SimpleFeature::IsIdInBlacklist(const std::string& extension_id) const {
@@ -659,4 +660,10 @@ bool SimpleFeature::IsValidExtensionId(const std::string& extension_id) {
return (extension_id.length() == 32);
}
+void SimpleFeature::set_matches(const std::vector<std::string>& matches) {
+ matches_.ClearPatterns();
+ for (const std::string& pattern : matches)
+ matches_.AddPattern(URLPattern(URLPattern::SCHEME_ALL, pattern));
+}
+
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698