OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 EXTENSIONS_COMMON_FEATURES_FEATURE_H_ | 5 #ifndef EXTENSIONS_COMMON_FEATURES_FEATURE_H_ |
6 #define EXTENSIONS_COMMON_FEATURES_FEATURE_H_ | 6 #define EXTENSIONS_COMMON_FEATURES_FEATURE_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 // | 143 // |
144 // Generally try not to use this function. Even if you don't think a Feature | 144 // Generally try not to use this function. Even if you don't think a Feature |
145 // relies on an Extension now - maybe it will, one day, so if there's an | 145 // relies on an Extension now - maybe it will, one day, so if there's an |
146 // Extension available (or a runtime context, etc) then use the more targeted | 146 // Extension available (or a runtime context, etc) then use the more targeted |
147 // method instead. | 147 // method instead. |
148 Availability IsAvailableToEnvironment() const; | 148 Availability IsAvailableToEnvironment() const; |
149 | 149 |
150 virtual bool IsIdInBlacklist(const std::string& extension_id) const = 0; | 150 virtual bool IsIdInBlacklist(const std::string& extension_id) const = 0; |
151 virtual bool IsIdInWhitelist(const std::string& extension_id) const = 0; | 151 virtual bool IsIdInWhitelist(const std::string& extension_id) const = 0; |
152 | 152 |
153 void set_check_channel(bool check_channel) { check_channel_ = check_channel; } | |
154 | |
155 protected: | 153 protected: |
156 std::string name_; | 154 std::string name_; |
157 std::string alias_; | 155 std::string alias_; |
158 std::string source_; | 156 std::string source_; |
159 bool no_parent_; | 157 bool no_parent_; |
160 // TODO(devlin): Remove this once we set the feature channel for tests. | |
161 bool check_channel_; | |
162 }; | 158 }; |
163 | 159 |
164 } // namespace extensions | 160 } // namespace extensions |
165 | 161 |
166 #endif // EXTENSIONS_COMMON_FEATURES_FEATURE_H_ | 162 #endif // EXTENSIONS_COMMON_FEATURES_FEATURE_H_ |
OLD | NEW |