| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 COMPONENTS_NTP_SNIPPETS_FEATURES_H_ | 5 #ifndef COMPONENTS_NTP_SNIPPETS_FEATURES_H_ |
| 6 #define COMPONENTS_NTP_SNIPPETS_FEATURES_H_ | 6 #define COMPONENTS_NTP_SNIPPETS_FEATURES_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/feature_list.h" | 10 #include "base/feature_list.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 // Global toggle for the whole content suggestions feature. If this is set to | 31 // Global toggle for the whole content suggestions feature. If this is set to |
| 32 // false, all the per-provider features are ignored. | 32 // false, all the per-provider features are ignored. |
| 33 extern const base::Feature kContentSuggestionsFeature; | 33 extern const base::Feature kContentSuggestionsFeature; |
| 34 | 34 |
| 35 // Feature to allow UI as specified here: https://crbug.com/660837. | 35 // Feature to allow UI as specified here: https://crbug.com/660837. |
| 36 extern const base::Feature kIncreasedVisibility; | 36 extern const base::Feature kIncreasedVisibility; |
| 37 | 37 |
| 38 // Feature to enable the Fetch More action | 38 // Feature to enable the Fetch More action |
| 39 extern const base::Feature kFetchMoreFeature; | 39 extern const base::Feature kFetchMoreFeature; |
| 40 | 40 |
| 41 // Returns a feature param as an int instead of a string. | |
| 42 int GetParamAsInt(const base::Feature& feature, | |
| 43 const std::string& param_name, | |
| 44 int default_value); | |
| 45 | |
| 46 // Returns a feature param as a bool instead of a string. | |
| 47 // TODO(jkrcal): Use this function in other code in the ntp_snippets component. | |
| 48 bool GetParamAsBool(const base::Feature& feature, | |
| 49 const std::string& param_name, | |
| 50 bool default_value); | |
| 51 | |
| 52 } // namespace ntp_snippets | 41 } // namespace ntp_snippets |
| 53 | 42 |
| 54 #endif // COMPONENTS_NTP_SNIPPETS_FEATURES_H_ | 43 #endif // COMPONENTS_NTP_SNIPPETS_FEATURES_H_ |
| OLD | NEW |