Chromium Code Reviews| Index: chrome/common/extensions/feature.h |
| diff --git a/chrome/common/extensions/feature.h b/chrome/common/extensions/feature.h |
| index 374767055efe108258c92cb676e9402e0d474749..61850c9edd1e2f970744a2b6049e483aa5108af2 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,19 @@ class Feature { |
| INVALID_MIN_MANIFEST_VERSION, |
| INVALID_MAX_MANIFEST_VERSION, |
| NOT_PRESENT, |
| - DEPENDENCY_NOT_PRESENT |
| + DEPENDENCY_NOT_PRESENT, |
| + UNSUPPORTED_CHANNEL, |
| }; |
| Feature(); |
| Feature(const Feature& other); |
| virtual ~Feature(); |
| + // Sets the Channel to compare against. This will be initialized as |
| + // chrome::VersionInfo::GetChannel(), which is fine for all but testing |
| + // purposes. |
| + void SetChannelForTesting(chrome::VersionInfo::Channel channel); |
| + |
| const std::string& name() const { return name_; } |
| void set_name(const std::string& name) { name_ = name; } |
| @@ -148,6 +155,12 @@ class Feature { |
| Platform platform_; // we only care about chromeos/not-chromeos now |
| int min_manifest_version_; |
| int max_manifest_version_; |
| + |
| + // The Channel to compare against |supported_channel_|. Mutable for unit |
| + // tests, usually this is just chrome::VersionInfo::GetChannel(). |
| + chrome::VersionInfo::Channel channel_; |
|
Aaron Boodman
2012/04/11 23:35:53
Sucks to have a separate value here for every sing
not at google - send to devlin
2012/04/12 00:05:21
Yeah, nicer.
|
| + |
| + chrome::VersionInfo::Channel supported_channel_; |
| }; |
| } // namespace extensions |