Chromium Code Reviews| 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 138 // configured by command line flags and/or Chrome channel. | 138 // configured by command line flags and/or Chrome channel. |
| 139 // | 139 // |
| 140 // Generally try not to use this function. Even if you don't think a Feature | 140 // Generally try not to use this function. Even if you don't think a Feature |
| 141 // relies on an Extension now - maybe it will, one day, so if there's an | 141 // relies on an Extension now - maybe it will, one day, so if there's an |
| 142 // Extension available (or a runtime context, etc) then use the more targeted | 142 // Extension available (or a runtime context, etc) then use the more targeted |
| 143 // method instead. | 143 // method instead. |
| 144 Availability IsAvailableToEnvironment() const; | 144 Availability IsAvailableToEnvironment() const; |
| 145 | 145 |
| 146 virtual bool IsIdInBlacklist(const std::string& extension_id) const = 0; | 146 virtual bool IsIdInBlacklist(const std::string& extension_id) const = 0; |
| 147 virtual bool IsIdInWhitelist(const std::string& extension_id) const = 0; | 147 virtual bool IsIdInWhitelist(const std::string& extension_id) const = 0; |
| 148 virtual std::string GetAlias() const = 0; | |
| 149 virtual std::string GetSource() const = 0; | |
|
Devlin
2016/11/14 18:03:56
We document that complex features only support a s
tbarzic
2016/11/15 04:45:07
Done.
| |
| 148 | 150 |
| 149 void set_check_channel(bool check_channel) { check_channel_ = check_channel; } | 151 void set_check_channel(bool check_channel) { check_channel_ = check_channel; } |
| 150 | 152 |
| 151 protected: | 153 protected: |
| 152 std::string name_; | 154 std::string name_; |
| 153 bool no_parent_; | 155 bool no_parent_; |
| 154 // TODO(devlin): Remove this once we set the feature channel for tests. | 156 // TODO(devlin): Remove this once we set the feature channel for tests. |
| 155 bool check_channel_; | 157 bool check_channel_; |
| 156 }; | 158 }; |
| 157 | 159 |
| 158 } // namespace extensions | 160 } // namespace extensions |
| 159 | 161 |
| 160 #endif // EXTENSIONS_COMMON_FEATURES_FEATURE_H_ | 162 #endif // EXTENSIONS_COMMON_FEATURES_FEATURE_H_ |
| OLD | NEW |