Chromium Code Reviews| 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); |
| }; |