Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(374)

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

Issue 2137463003: [Extensions] Move Feature channel code into //extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test fix 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
« no previous file with comments | « extensions/common/features/feature_channel.cc ('k') | extensions/common/features/simple_feature.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/features/simple_feature.h
diff --git a/extensions/common/features/simple_feature.h b/extensions/common/features/simple_feature.h
index cefd73067da70237e588a39988e8af66ffba972b..373f6e54743da0beb7cacaa8d9be97f9b34272c5 100644
--- a/extensions/common/features/simple_feature.h
+++ b/extensions/common/features/simple_feature.h
@@ -17,9 +17,9 @@
#include "base/lazy_instance.h"
#include "base/macros.h"
#include "base/values.h"
+#include "components/version_info/version_info.h"
#include "extensions/common/extension.h"
#include "extensions/common/features/feature.h"
-#include "extensions/common/features/simple_feature_filter.h"
#include "extensions/common/manifest.h"
namespace extensions {
@@ -46,14 +46,6 @@ class SimpleFeature : public Feature {
SimpleFeature();
~SimpleFeature() override;
- // Dependency resolution is a property of Features that is preferrably
- // handled internally to avoid temptation, but FeatureFilters may need
- // to know if there are any at all.
- bool HasDependencies() const;
-
- // Adds a filter to this feature. The feature takes ownership of the filter.
- void AddFilter(std::unique_ptr<SimpleFeatureFilter> filter);
-
// Parses the JSON representation of a feature into the fields of this object.
// Unspecified values in the JSON are not modified in the object. This allows
// us to implement inheritance by parsing one value after another. Returns
@@ -87,11 +79,6 @@ class SimpleFeature : public Feature {
const GURL& url,
Platform platform) const override;
- std::string GetAvailabilityMessage(AvailabilityResult result,
- Manifest::Type type,
- const GURL& url,
- Context context) const override;
-
bool IsInternal() const override;
bool IsIdInBlacklist(const std::string& extension_id) const override;
@@ -141,6 +128,12 @@ class SimpleFeature : public Feature {
command_line_switch_ = command_line_switch;
}
+ std::string GetAvailabilityMessage(AvailabilityResult result,
+ Manifest::Type type,
+ const GURL& url,
+ Context context,
+ version_info::Channel channel) const;
+
// Handy utilities which construct the correct availability message.
Availability CreateAvailability(AvailabilityResult result) const;
Availability CreateAvailability(AvailabilityResult result,
@@ -149,6 +142,8 @@ class SimpleFeature : public Feature {
const GURL& url) const;
Availability CreateAvailability(AvailabilityResult result,
Context context) const;
+ Availability CreateAvailability(AvailabilityResult result,
+ version_info::Channel channel) const;
private:
friend class SimpleFeatureTest;
@@ -204,8 +199,7 @@ class SimpleFeature : public Feature {
int max_manifest_version_;
bool component_extensions_auto_granted_;
std::string command_line_switch_;
-
- std::vector<std::unique_ptr<SimpleFeatureFilter>> filters_;
+ std::unique_ptr<version_info::Channel> channel_;
DISALLOW_COPY_AND_ASSIGN(SimpleFeature);
};
« no previous file with comments | « extensions/common/features/feature_channel.cc ('k') | extensions/common/features/simple_feature.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698