| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 return IsAvailableToContext(extension, context, GURL(), platform); | 70 return IsAvailableToContext(extension, context, GURL(), platform); |
| 71 } | 71 } |
| 72 Availability IsAvailableToContext(const Extension* extension, | 72 Availability IsAvailableToContext(const Extension* extension, |
| 73 Context context, | 73 Context context, |
| 74 const GURL& url) const { | 74 const GURL& url) const { |
| 75 return IsAvailableToContext(extension, context, url, GetCurrentPlatform()); | 75 return IsAvailableToContext(extension, context, url, GetCurrentPlatform()); |
| 76 } | 76 } |
| 77 | 77 |
| 78 // extension::Feature: | 78 // extension::Feature: |
| 79 Availability IsAvailableToManifest(const std::string& extension_id, | 79 Availability IsAvailableToManifest(const std::string& extension_id, |
| 80 const std::string& hashed_id, |
| 80 Manifest::Type type, | 81 Manifest::Type type, |
| 81 Manifest::Location location, | 82 Manifest::Location location, |
| 82 int manifest_version, | 83 int manifest_version, |
| 83 Platform platform) const override; | 84 Platform platform) const override; |
| 84 | 85 |
| 85 Availability IsAvailableToContext(const Extension* extension, | 86 Availability IsAvailableToContext(const Extension* extension, |
| 86 Context context, | 87 Context context, |
| 87 const GURL& url, | 88 const GURL& url, |
| 88 Platform platform) const override; | 89 Platform platform) const override; |
| 89 | 90 |
| 90 std::string GetAvailabilityMessage(AvailabilityResult result, | 91 std::string GetAvailabilityMessage(AvailabilityResult result, |
| 91 Manifest::Type type, | 92 Manifest::Type type, |
| 92 const GURL& url, | 93 const GURL& url, |
| 93 Context context) const override; | 94 Context context) const override; |
| 94 | 95 |
| 95 bool IsInternal() const override; | 96 bool IsInternal() const override; |
| 96 | 97 |
| 97 bool IsIdInBlacklist(const std::string& extension_id) const override; | 98 bool IsIdInBlacklist(const std::string& extension_id, |
| 98 bool IsIdInWhitelist(const std::string& extension_id) const override; | 99 const std::string& hashed_id) const override; |
| 100 bool IsIdInWhitelist(const std::string& extension_id, |
| 101 const std::string& hashed_id) const override; |
| 99 | 102 |
| 100 static bool IsIdInArray(const std::string& extension_id, | 103 static bool IsIdInArray(const std::string& extension_id, |
| 101 const char* const array[], | 104 const char* const array[], |
| 102 size_t array_length); | 105 size_t array_length); |
| 103 | 106 |
| 104 protected: | 107 protected: |
| 105 // Similar to Manifest::Location, these are the classes of locations | 108 // Similar to Manifest::Location, these are the classes of locations |
| 106 // supported in feature files. Production code should never directly access | 109 // supported in feature files. Production code should never directly access |
| 107 // these. | 110 // these. |
| 108 enum Location { | 111 enum Location { |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 std::string command_line_switch_; | 209 std::string command_line_switch_; |
| 207 | 210 |
| 208 std::vector<std::unique_ptr<SimpleFeatureFilter>> filters_; | 211 std::vector<std::unique_ptr<SimpleFeatureFilter>> filters_; |
| 209 | 212 |
| 210 DISALLOW_COPY_AND_ASSIGN(SimpleFeature); | 213 DISALLOW_COPY_AND_ASSIGN(SimpleFeature); |
| 211 }; | 214 }; |
| 212 | 215 |
| 213 } // namespace extensions | 216 } // namespace extensions |
| 214 | 217 |
| 215 #endif // EXTENSIONS_COMMON_FEATURES_SIMPLE_FEATURE_H_ | 218 #endif // EXTENSIONS_COMMON_FEATURES_SIMPLE_FEATURE_H_ |
| OLD | NEW |