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 |