Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_COMMON_EXTENSIONS_FEATURES_SIMPLE_FEATURE_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_FEATURES_SIMPLE_FEATURE_H_ |
| 6 #define CHROME_COMMON_EXTENSIONS_FEATURES_SIMPLE_FEATURE_H_ | 6 #define CHROME_COMMON_EXTENSIONS_FEATURES_SIMPLE_FEATURE_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 24 SimpleFeature(); | 24 SimpleFeature(); |
| 25 SimpleFeature(const SimpleFeature& other); | 25 SimpleFeature(const SimpleFeature& other); |
| 26 virtual ~SimpleFeature(); | 26 virtual ~SimpleFeature(); |
| 27 | 27 |
| 28 std::set<std::string>* whitelist() { return &whitelist_; } | 28 std::set<std::string>* whitelist() { return &whitelist_; } |
| 29 std::set<Manifest::Type>* extension_types() { return &extension_types_; } | 29 std::set<Manifest::Type>* extension_types() { return &extension_types_; } |
| 30 | 30 |
| 31 // Parses the JSON representation of a feature into the fields of this object. | 31 // Parses the JSON representation of a feature into the fields of this object. |
| 32 // Unspecified values in the JSON are not modified in the object. This allows | 32 // Unspecified values in the JSON are not modified in the object. This allows |
| 33 // us to implement inheritance by parsing one value after another. | 33 // us to implement inheritance by parsing one value after another. |
| 34 void Parse(const DictionaryValue* value); | 34 virtual bool Parse(const DictionaryValue* value); |
|
not at google - send to devlin
2013/03/26 00:34:48
I think this should return a std::string error rat
cduvall
2013/03/26 19:24:05
Done.
| |
| 35 | 35 |
| 36 // Returns true if the feature contains the same values as another. | 36 // Returns true if the feature contains the same values as another. |
| 37 bool Equals(const SimpleFeature& other) const; | 37 bool Equals(const SimpleFeature& other) const; |
| 38 | 38 |
| 39 Location location() const { return location_; } | 39 Location location() const { return location_; } |
| 40 void set_location(Location location) { location_ = location; } | 40 void set_location(Location location) { location_ = location; } |
| 41 | 41 |
| 42 Platform platform() const { return platform_; } | 42 Platform platform() const { return platform_; } |
| 43 void set_platform(Platform platform) { platform_ = platform; } | 43 void set_platform(Platform platform) { platform_ = platform; } |
| 44 | 44 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 107 int min_manifest_version_; | 107 int min_manifest_version_; |
| 108 int max_manifest_version_; | 108 int max_manifest_version_; |
| 109 chrome::VersionInfo::Channel channel_; | 109 chrome::VersionInfo::Channel channel_; |
| 110 | 110 |
| 111 FRIEND_TEST_ALL_PREFIXES(ExtensionSimpleFeatureTest, Context); | 111 FRIEND_TEST_ALL_PREFIXES(ExtensionSimpleFeatureTest, Context); |
| 112 }; | 112 }; |
| 113 | 113 |
| 114 } // namespace extensions | 114 } // namespace extensions |
| 115 | 115 |
| 116 #endif // CHROME_COMMON_EXTENSIONS_FEATURES_SIMPLE_FEATURE_H_ | 116 #endif // CHROME_COMMON_EXTENSIONS_FEATURES_SIMPLE_FEATURE_H_ |
| OLD | NEW |