| 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 <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 extern const base::Feature kSectionDismissalFeature; | 36 extern const base::Feature kSectionDismissalFeature; |
| 37 | 37 |
| 38 // Feature to allow specification of content suggestions source. | 38 // Feature to allow specification of content suggestions source. |
| 39 // TODO(peconn): Figure out how to remove this, it is useful to specify the | 39 // TODO(peconn): Figure out how to remove this, it is useful to specify the |
| 40 // source, but you shouldn't be able to disable it. | 40 // source, but you shouldn't be able to disable it. |
| 41 extern const base::Feature kContentSuggestionsSource; | 41 extern const base::Feature kContentSuggestionsSource; |
| 42 | 42 |
| 43 // Feature to allow UI as specified here: https://crbug.com/660837. | 43 // Feature to allow UI as specified here: https://crbug.com/660837. |
| 44 extern const base::Feature kIncreasedVisibility; | 44 extern const base::Feature kIncreasedVisibility; |
| 45 | 45 |
| 46 // Feature to enable the Fetch More action | |
| 47 extern const base::Feature kFetchMoreFeature; | |
| 48 | |
| 49 // Feature to prefer AMP URLs over regular URLs when available. | 46 // Feature to prefer AMP URLs over regular URLs when available. |
| 50 extern const base::Feature kPreferAmpUrlsFeature; | 47 extern const base::Feature kPreferAmpUrlsFeature; |
| 51 | 48 |
| 52 // Feature to choose a category ranker. | 49 // Feature to choose a category ranker. |
| 53 extern const base::Feature kCategoryRanker; | 50 extern const base::Feature kCategoryRanker; |
| 54 | 51 |
| 55 // Parameter for a kCategoryRanker feature flag. | 52 // Parameter for a kCategoryRanker feature flag. |
| 56 extern const char kCategoryRankerParameter[]; | 53 extern const char kCategoryRankerParameter[]; |
| 57 // Possible values of the parameter above. | 54 // Possible values of the parameter above. |
| 58 extern const char kCategoryRankerConstantRanker[]; | 55 extern const char kCategoryRankerConstantRanker[]; |
| 59 extern const char kCategoryRankerClickBasedRanker[]; | 56 extern const char kCategoryRankerClickBasedRanker[]; |
| 60 | 57 |
| 61 enum class CategoryRankerChoice { | 58 enum class CategoryRankerChoice { |
| 62 CONSTANT, | 59 CONSTANT, |
| 63 CLICK_BASED, | 60 CLICK_BASED, |
| 64 }; | 61 }; |
| 65 | 62 |
| 66 // Returns which CategoryRanker to use according to kCategoryRanker feature. | 63 // Returns which CategoryRanker to use according to kCategoryRanker feature. |
| 67 CategoryRankerChoice GetSelectedCategoryRanker(); | 64 CategoryRankerChoice GetSelectedCategoryRanker(); |
| 68 | 65 |
| 69 // Builds a CategoryRanker according to kCategoryRanker feature. | 66 // Builds a CategoryRanker according to kCategoryRanker feature. |
| 70 std::unique_ptr<CategoryRanker> BuildSelectedCategoryRanker( | 67 std::unique_ptr<CategoryRanker> BuildSelectedCategoryRanker( |
| 71 PrefService* pref_service, | 68 PrefService* pref_service, |
| 72 std::unique_ptr<base::Clock> clock); | 69 std::unique_ptr<base::Clock> clock); |
| 73 | 70 |
| 74 } // namespace ntp_snippets | 71 } // namespace ntp_snippets |
| 75 | 72 |
| 76 #endif // COMPONENTS_NTP_SNIPPETS_FEATURES_H_ | 73 #endif // COMPONENTS_NTP_SNIPPETS_FEATURES_H_ |
| OLD | NEW |