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

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

Issue 2186893002: Reduce size of generated extension FeatureProviders. (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
« no previous file with comments | « extensions/common/features/feature.cc ('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/json_feature_provider.cc
diff --git a/extensions/common/features/json_feature_provider.cc b/extensions/common/features/json_feature_provider.cc
index 11d95418ec46d0440f30e6733f7608f9d93f8429..ab5e026efde740b3a430804519dfde84d9bf6ea3 100644
--- a/extensions/common/features/json_feature_provider.cc
+++ b/extensions/common/features/json_feature_provider.cc
@@ -109,7 +109,7 @@ JSONFeatureProvider::JSONFeatureProvider(const base::DictionaryValue& root,
if (parse_error)
continue;
- features_[iter.key()] = std::move(feature);
+ AddFeature(iter.key(), std::move(feature));
} else if (iter.value().GetType() == base::Value::TYPE_LIST) {
// This is a complex feature.
const base::ListValue* list =
@@ -138,7 +138,7 @@ JSONFeatureProvider::JSONFeatureProvider(const base::DictionaryValue& root,
new ComplexFeature(std::move(features)));
feature->set_name(iter.key());
- features_[iter.key()] = std::move(feature);
+ AddFeature(iter.key(), std::move(feature));
} else {
LOG(ERROR) << iter.key() << ": Feature description must be dictionary or"
<< " list of dictionaries.";
« no previous file with comments | « extensions/common/features/feature.cc ('k') | extensions/common/features/simple_feature.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698