| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   87     const std::string message_; |   87     const std::string message_; | 
|   88   }; |   88   }; | 
|   89  |   89  | 
|   90   Feature(); |   90   Feature(); | 
|   91   virtual ~Feature(); |   91   virtual ~Feature(); | 
|   92  |   92  | 
|   93   const std::string& name() const { return name_; } |   93   const std::string& name() const { return name_; } | 
|   94   // Note that this arg is passed as a StringPiece to avoid a lot of bloat from |   94   // Note that this arg is passed as a StringPiece to avoid a lot of bloat from | 
|   95   // inlined std::string code. |   95   // inlined std::string code. | 
|   96   void set_name(base::StringPiece name); |   96   void set_name(base::StringPiece name); | 
 |   97   const std::string& alias() const { return alias_; } | 
 |   98   void set_alias(base::StringPiece alias); | 
 |   99   const std::string& source() const { return source_; } | 
 |  100   void set_source(base::StringPiece source); | 
|   97   bool no_parent() const { return no_parent_; } |  101   bool no_parent() const { return no_parent_; } | 
|   98  |  102  | 
|   99   // Gets the platform the code is currently running on. |  103   // Gets the platform the code is currently running on. | 
|  100   static Platform GetCurrentPlatform(); |  104   static Platform GetCurrentPlatform(); | 
|  101  |  105  | 
|  102   // Tests whether this is an internal API or not. |  106   // Tests whether this is an internal API or not. | 
|  103   virtual bool IsInternal() const = 0; |  107   virtual bool IsInternal() const = 0; | 
|  104  |  108  | 
|  105   // Returns true if the feature is available to be parsed into a new extension |  109   // Returns true if the feature is available to be parsed into a new extension | 
|  106   // manifest. |  110   // manifest. | 
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  143   // method instead. |  147   // method instead. | 
|  144   Availability IsAvailableToEnvironment() const; |  148   Availability IsAvailableToEnvironment() const; | 
|  145  |  149  | 
|  146   virtual bool IsIdInBlacklist(const std::string& extension_id) const = 0; |  150   virtual bool IsIdInBlacklist(const std::string& extension_id) const = 0; | 
|  147   virtual bool IsIdInWhitelist(const std::string& extension_id) const = 0; |  151   virtual bool IsIdInWhitelist(const std::string& extension_id) const = 0; | 
|  148  |  152  | 
|  149   void set_check_channel(bool check_channel) { check_channel_ = check_channel; } |  153   void set_check_channel(bool check_channel) { check_channel_ = check_channel; } | 
|  150  |  154  | 
|  151  protected: |  155  protected: | 
|  152   std::string name_; |  156   std::string name_; | 
 |  157   std::string alias_; | 
 |  158   std::string source_; | 
|  153   bool no_parent_; |  159   bool no_parent_; | 
|  154   // TODO(devlin): Remove this once we set the feature channel for tests. |  160   // TODO(devlin): Remove this once we set the feature channel for tests. | 
|  155   bool check_channel_; |  161   bool check_channel_; | 
|  156 }; |  162 }; | 
|  157  |  163  | 
|  158 }  // namespace extensions |  164 }  // namespace extensions | 
|  159  |  165  | 
|  160 #endif  // EXTENSIONS_COMMON_FEATURES_FEATURE_H_ |  166 #endif  // EXTENSIONS_COMMON_FEATURES_FEATURE_H_ | 
| OLD | NEW |