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

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

Issue 1772683002: FeatureProvider returns std::map instead of vector (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review Created 4 years, 9 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/base_feature_provider.cc ('k') | extensions/common/manifest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/features/feature_provider.h
diff --git a/extensions/common/features/feature_provider.h b/extensions/common/features/feature_provider.h
index 40d8ab84f6d8cf19b69ffd62116ed92b162a9542..ae975137b508e845f81fca7498652006bf2bcaa3 100644
--- a/extensions/common/features/feature_provider.h
+++ b/extensions/common/features/feature_provider.h
@@ -5,13 +5,18 @@
#ifndef EXTENSIONS_COMMON_FEATURES_FEATURE_PROVIDER_H_
#define EXTENSIONS_COMMON_FEATURES_FEATURE_PROVIDER_H_
+#include <map>
#include <string>
#include <vector>
+#include "base/memory/scoped_ptr.h"
+
namespace extensions {
class Feature;
+using FeatureMap = std::map<std::string, scoped_ptr<Feature>>;
+
// Implemented by classes that can vend features.
class FeatureProvider {
public:
@@ -52,8 +57,8 @@ class FeatureProvider {
// Returns the features inside the |parent| namespace, recursively.
virtual std::vector<Feature*> GetChildren(const Feature& parent) const = 0;
- // Returns all features described by this instance, in asciibetical order.
- virtual const std::vector<std::string>& GetAllFeatureNames() const = 0;
+ // Returns a map containing all features described by this instance.
+ virtual const FeatureMap& GetAllFeatures() const = 0;
};
} // namespace extensions
« no previous file with comments | « extensions/common/features/base_feature_provider.cc ('k') | extensions/common/manifest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698