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

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

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
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 59c16699d591324619808db6c8b919164b33ee95..5b6be3d3ce76d79a7673fd467e76f878a1a13d74 100644
--- a/extensions/common/features/base_feature_provider.h
+++ b/extensions/common/features/base_feature_provider.h
@@ -11,6 +11,7 @@
#include <vector>
#include "base/macros.h"
+#include "base/strings/string_piece.h"
#include "extensions/common/features/feature_provider.h"
namespace extensions {
@@ -37,9 +38,12 @@ class BaseFeatureProvider : public FeatureProvider {
protected:
BaseFeatureProvider();
- std::map<std::string, std::unique_ptr<Feature>> features_;
+
+ void AddFeature(base::StringPiece name, std::unique_ptr<Feature> feature);
Devlin 2016/07/27 16:46:23 For my own edification, what's the motivation behi
dcheng 2016/07/27 17:02:36 1. map::operator[] generates a bunch of inline cod
Devlin 2016/07/27 17:04:59 Ah, makes sense. Thanks!
private:
+ std::map<std::string, std::unique_ptr<Feature>> features_;
+
DISALLOW_COPY_AND_ASSIGN(BaseFeatureProvider);
};
« no previous file with comments | « no previous file | extensions/common/features/base_feature_provider.cc » ('j') | extensions/common/features/simple_feature.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698