| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SIMPLE_FEATURE_H_ | 5 #ifndef EXTENSIONS_COMMON_FEATURES_SIMPLE_FEATURE_H_ |
| 6 #define EXTENSIONS_COMMON_FEATURES_SIMPLE_FEATURE_H_ | 6 #define EXTENSIONS_COMMON_FEATURES_SIMPLE_FEATURE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 // set_matches() is an exception to pass-by-value since we construct an | 120 // set_matches() is an exception to pass-by-value since we construct an |
| 121 // URLPatternSet from the vector of strings. | 121 // URLPatternSet from the vector of strings. |
| 122 // TODO(devlin): Pass in an URLPatternSet directly. | 122 // TODO(devlin): Pass in an URLPatternSet directly. |
| 123 void set_matches(const std::vector<std::string>& matches); | 123 void set_matches(const std::vector<std::string>& matches); |
| 124 void set_max_manifest_version(int max_manifest_version) { | 124 void set_max_manifest_version(int max_manifest_version) { |
| 125 max_manifest_version_ = max_manifest_version; | 125 max_manifest_version_ = max_manifest_version; |
| 126 } | 126 } |
| 127 void set_min_manifest_version(int min_manifest_version) { | 127 void set_min_manifest_version(int min_manifest_version) { |
| 128 min_manifest_version_ = min_manifest_version; | 128 min_manifest_version_ = min_manifest_version; |
| 129 } | 129 } |
| 130 void set_noparent(bool no_parent) { no_parent_ = no_parent; } |
| 130 void set_platforms(std::vector<Platform>&& platforms); | 131 void set_platforms(std::vector<Platform>&& platforms); |
| 131 void set_whitelist(std::vector<std::string>&& whitelist); | 132 void set_whitelist(std::vector<std::string>&& whitelist); |
| 132 | 133 |
| 133 protected: | 134 protected: |
| 134 // Accessors used by subclasses in feature verification. | 135 // Accessors used by subclasses in feature verification. |
| 135 const std::vector<std::string>& blacklist() const { return blacklist_; } | 136 const std::vector<std::string>& blacklist() const { return blacklist_; } |
| 136 const std::vector<std::string>& whitelist() const { return whitelist_; } | 137 const std::vector<std::string>& whitelist() const { return whitelist_; } |
| 137 const std::vector<Manifest::Type>& extension_types() const { | 138 const std::vector<Manifest::Type>& extension_types() const { |
| 138 return extension_types_; | 139 return extension_types_; |
| 139 } | 140 } |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 bool is_internal_; | 232 bool is_internal_; |
| 232 std::string command_line_switch_; | 233 std::string command_line_switch_; |
| 233 std::unique_ptr<version_info::Channel> channel_; | 234 std::unique_ptr<version_info::Channel> channel_; |
| 234 | 235 |
| 235 DISALLOW_COPY_AND_ASSIGN(SimpleFeature); | 236 DISALLOW_COPY_AND_ASSIGN(SimpleFeature); |
| 236 }; | 237 }; |
| 237 | 238 |
| 238 } // namespace extensions | 239 } // namespace extensions |
| 239 | 240 |
| 240 #endif // EXTENSIONS_COMMON_FEATURES_SIMPLE_FEATURE_H_ | 241 #endif // EXTENSIONS_COMMON_FEATURES_SIMPLE_FEATURE_H_ |
| OLD | NEW |