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

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: Include fix 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
« no previous file with comments | « extensions/common/features/simple_feature.h ('k') | extensions/common/features/simple_feature_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/features/simple_feature.cc
diff --git a/extensions/common/features/simple_feature.cc b/extensions/common/features/simple_feature.cc
index d689f6cf05aaf933f29d78ab6db9199202dbec4a..9da2b991a4c8a1e912d8641cb9f6a5583e0ca345 100644
--- a/extensions/common/features/simple_feature.cc
+++ b/extensions/common/features/simple_feature.cc
@@ -311,7 +311,7 @@ SimpleFeature::SimpleFeature()
min_manifest_version_(0),
max_manifest_version_(0),
component_extensions_auto_granted_(true),
- internal_(false) {}
+ is_internal_(false) {}
SimpleFeature::~SimpleFeature() {}
@@ -360,7 +360,7 @@ void SimpleFeature::Parse(const base::DictionaryValue* dictionary) {
ParseEnum<version_info::Channel>(value, channel_.get(),
mappings.Get().channels);
} else if (key == "internal") {
- value->GetAsBoolean(&internal_);
+ value->GetAsBoolean(&is_internal_);
}
}
@@ -591,7 +591,7 @@ Feature::Availability SimpleFeature::CreateAvailability(
}
bool SimpleFeature::IsInternal() const {
- return internal_;
+ return is_internal_;
}
bool SimpleFeature::IsIdInBlacklist(const std::string& extension_id) const {
@@ -667,4 +667,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
« no previous file with comments | « extensions/common/features/simple_feature.h ('k') | extensions/common/features/simple_feature_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698