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

Unified Diff: extensions/common/features/base_feature_provider.h

Issue 2193693003: Further reduction of feature_compiler.py generated code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@test-with-leiz
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/base_feature_provider.h
diff --git a/extensions/common/features/base_feature_provider.h b/extensions/common/features/base_feature_provider.h
index 5b6be3d3ce76d79a7673fd467e76f878a1a13d74..1b840f393ca6141c3554b729e640cb2c2c43cfa9 100644
--- a/extensions/common/features/base_feature_provider.h
+++ b/extensions/common/features/base_feature_provider.h
@@ -41,6 +41,10 @@ class BaseFeatureProvider : public FeatureProvider {
void AddFeature(base::StringPiece name, std::unique_ptr<Feature> feature);
+ // Takes ownership. Used in preference to unique_ptr variant to reduce size
+ // of generated code.
+ void AddFeature(base::StringPiece name, Feature* feature);
+
private:
std::map<std::string, std::unique_ptr<Feature>> features_;

Powered by Google App Engine
This is Rietveld 408576698