| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef COMPONENTS_FEATURE_ENGAGEMENT_TRACKER_INTERNAL_CONFIGURATION_H_ | 5 #ifndef COMPONENTS_FEATURE_ENGAGEMENT_TRACKER_INTERNAL_CONFIGURATION_H_ |
| 6 #define COMPONENTS_FEATURE_ENGAGEMENT_TRACKER_INTERNAL_CONFIGURATION_H_ | 6 #define COMPONENTS_FEATURE_ENGAGEMENT_TRACKER_INTERNAL_CONFIGURATION_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 // Convenience alias for typical implementations of Configuration. | 117 // Convenience alias for typical implementations of Configuration. |
| 118 using ConfigMap = std::map<const base::Feature*, FeatureConfig>; | 118 using ConfigMap = std::map<const base::Feature*, FeatureConfig>; |
| 119 | 119 |
| 120 virtual ~Configuration() = default; | 120 virtual ~Configuration() = default; |
| 121 | 121 |
| 122 // Returns the FeatureConfig for the given |feature|. The |feature| must | 122 // Returns the FeatureConfig for the given |feature|. The |feature| must |
| 123 // be registered with the Configuration instance. | 123 // be registered with the Configuration instance. |
| 124 virtual const FeatureConfig& GetFeatureConfig( | 124 virtual const FeatureConfig& GetFeatureConfig( |
| 125 const base::Feature& feature) const = 0; | 125 const base::Feature& feature) const = 0; |
| 126 | 126 |
| 127 // Returns the immutable ConfigMap that contains all registered features. |
| 128 virtual const ConfigMap& GetRegisteredFeatures() const = 0; |
| 129 |
| 127 protected: | 130 protected: |
| 128 Configuration() = default; | 131 Configuration() = default; |
| 129 | 132 |
| 130 private: | 133 private: |
| 131 DISALLOW_COPY_AND_ASSIGN(Configuration); | 134 DISALLOW_COPY_AND_ASSIGN(Configuration); |
| 132 }; | 135 }; |
| 133 | 136 |
| 134 } // namespace feature_engagement_tracker | 137 } // namespace feature_engagement_tracker |
| 135 | 138 |
| 136 #endif // COMPONENTS_FEATURE_ENGAGEMENT_TRACKER_INTERNAL_CONFIGURATION_H_ | 139 #endif // COMPONENTS_FEATURE_ENGAGEMENT_TRACKER_INTERNAL_CONFIGURATION_H_ |
| OLD | NEW |