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 23 matching lines...) Expand all Loading... | |
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 // Feature to prefer AMP URLs over regular URLs when available. | 41 // Feature to prefer AMP URLs over regular URLs when available. |
42 extern const base::Feature kPreferAmpUrlsFeature; | 42 extern const base::Feature kPreferAmpUrlsFeature; |
43 | 43 |
44 // Feature to choose a category ranker. | |
45 extern const base::Feature kCategoryRanker; | |
46 | |
47 const char kCategoryRankerParameter[] = "category_ranker"; | |
jkrcal
2016/12/22 13:39:15
can you make these extern as well and define them
vitaliii
2016/12/22 13:47:10
Done.
| |
48 const char kCategoryRankerConstantRanker[] = "constant"; | |
49 const char kCategoryRankerClickBasedRanker[] = "click_based"; | |
50 | |
51 enum class CategoryRankerChoice { | |
52 CONSTANT, | |
53 CLICK_BASED, | |
54 }; | |
55 | |
56 // Returns which CategoryRanker to use according to kCategoryRanker feature. | |
57 CategoryRankerChoice GetSelectedCategoryRanker(); | |
58 | |
44 } // namespace ntp_snippets | 59 } // namespace ntp_snippets |
45 | 60 |
46 #endif // COMPONENTS_NTP_SNIPPETS_FEATURES_H_ | 61 #endif // COMPONENTS_NTP_SNIPPETS_FEATURES_H_ |
OLD | NEW |