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

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

Issue 2172353002: [Extensions] Use rvalue references for SimpleFeature setters (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 9da2b991a4c8a1e912d8641cb9f6a5583e0ca345..88d110f7a63a7dda3ef50a95221e749a18f57fcc 100644
--- a/extensions/common/features/simple_feature.cc
+++ b/extensions/common/features/simple_feature.cc
@@ -667,10 +667,38 @@ bool SimpleFeature::IsValidExtensionId(const std::string& extension_id) {
return (extension_id.length() == 32);
}
+void SimpleFeature::set_blacklist(std::vector<std::string> blacklist) {
+ blacklist_ = std::move(blacklist);
+}
+
+void SimpleFeature::set_command_line_switch(std::string command_line_switch) {
+ command_line_switch_ = std::move(command_line_switch);
+}
+
+void SimpleFeature::set_contexts(std::vector<Context> contexts) {
+ contexts_ = std::move(contexts);
+}
+
+void SimpleFeature::set_dependencies(std::vector<std::string> dependencies) {
+ dependencies_ = std::move(dependencies);
+}
+
+void SimpleFeature::set_extension_types(std::vector<Manifest::Type> types) {
+ extension_types_ = std::move(types);
+}
+
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));
}
+void SimpleFeature::set_platforms(std::vector<Platform> platforms) {
+ platforms_ = std::move(platforms);
+}
+
+void SimpleFeature::set_whitelist(std::vector<std::string> whitelist) {
+ whitelist_ = std::move(whitelist);
+}
+
} // namespace extensions
« extensions/common/features/simple_feature.h ('K') | « extensions/common/features/simple_feature.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698