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

Unified Diff: chrome/common/extensions/feature.h

Issue 10054035: Allow extension APIs to be restricted to a subset of Chrome channels using the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make default channel "trunk" Created 8 years, 8 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 | « chrome/common/extensions/api/bookmarks.json ('k') | chrome/common/extensions/feature.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/feature.h
diff --git a/chrome/common/extensions/feature.h b/chrome/common/extensions/feature.h
index 374767055efe108258c92cb676e9402e0d474749..1e1fb336fa6468ee4652f6810bcb3b737077e1f5 100644
--- a/chrome/common/extensions/feature.h
+++ b/chrome/common/extensions/feature.h
@@ -11,6 +11,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/values.h"
+#include "chrome/common/chrome_version_info.h"
#include "chrome/common/extensions/extension.h"
namespace extensions {
@@ -62,13 +63,17 @@ class Feature {
INVALID_MIN_MANIFEST_VERSION,
INVALID_MAX_MANIFEST_VERSION,
NOT_PRESENT,
- DEPENDENCY_NOT_PRESENT
+ UNSUPPORTED_CHANNEL,
};
Feature();
Feature(const Feature& other);
virtual ~Feature();
+ // Sets the Channel to for all Features to compare against. This is usually
+ // chrome::VersionInfo::GetChannel(), but for tests all this to be overridden.
+ static void SetChannelForTesting(chrome::VersionInfo::Channel channel);
+
const std::string& name() const { return name_; }
void set_name(const std::string& name) { name_ = name; }
@@ -148,6 +153,7 @@ class Feature {
Platform platform_; // we only care about chromeos/not-chromeos now
int min_manifest_version_;
int max_manifest_version_;
+ chrome::VersionInfo::Channel supported_channel_;
};
} // namespace extensions
« no previous file with comments | « chrome/common/extensions/api/bookmarks.json ('k') | chrome/common/extensions/feature.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698