Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(282)

Side by Side Diff: components/ntp_snippets/features.h

Issue 2696563002: [NTP::SectionOrder] Add EM oriented order. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 28 matching lines...) Expand all
39 39
40 // Feature to allow UI as specified here: https://crbug.com/660837. 40 // Feature to allow UI as specified here: https://crbug.com/660837.
41 extern const base::Feature kIncreasedVisibility; 41 extern const base::Feature kIncreasedVisibility;
42 42
43 // Feature to prefer AMP URLs over regular URLs when available. 43 // Feature to prefer AMP URLs over regular URLs when available.
44 extern const base::Feature kPreferAmpUrlsFeature; 44 extern const base::Feature kPreferAmpUrlsFeature;
45 45
46 // Feature to choose a category ranker. 46 // Feature to choose a category ranker.
47 extern const base::Feature kCategoryRanker; 47 extern const base::Feature kCategoryRanker;
48 48
49 // Parameter for a kCategoryRanker feature flag. 49 // Parameter and its values for the kCategoryRanker feature flag.
50 extern const char kCategoryRankerParameter[]; 50 extern const char kCategoryRankerParameter[];
51 // Possible values of the parameter above.
52 extern const char kCategoryRankerConstantRanker[]; 51 extern const char kCategoryRankerConstantRanker[];
53 extern const char kCategoryRankerClickBasedRanker[]; 52 extern const char kCategoryRankerClickBasedRanker[];
54 53
55 enum class CategoryRankerChoice { 54 enum class CategoryRankerChoice {
56 CONSTANT, 55 CONSTANT,
57 CLICK_BASED, 56 CLICK_BASED,
58 }; 57 };
59 58
60 // Returns which CategoryRanker to use according to kCategoryRanker feature. 59 // Returns which CategoryRanker to use according to kCategoryRanker feature.
61 CategoryRankerChoice GetSelectedCategoryRanker(); 60 CategoryRankerChoice GetSelectedCategoryRanker();
62 61
63 // Builds a CategoryRanker according to kCategoryRanker feature. 62 // Builds a CategoryRanker according to kCategoryRanker feature.
64 std::unique_ptr<CategoryRanker> BuildSelectedCategoryRanker( 63 std::unique_ptr<CategoryRanker> BuildSelectedCategoryRanker(
65 PrefService* pref_service, 64 PrefService* pref_service,
66 std::unique_ptr<base::Clock> clock); 65 std::unique_ptr<base::Clock> clock);
67 66
67 // Feature to choose a default category order.
68 extern const base::Feature kCategoryOrder;
69
70 extern const char kCategoryOrderParameter[];
Marc Treib 2017/02/13 14:25:23 Comment, similar to CategoryRanker above?
vitaliii 2017/02/14 09:32:32 Done.
71 extern const char kCategoryOrderGeneral[];
72 extern const char kCategoryOrderEmergingMarketsOriented[];
73
74 enum class CategoryOrderChoice {
75 GENERAL,
Marc Treib 2017/02/13 14:25:23 DEFAULT?
vitaliii 2017/02/14 09:32:32 I thought about this. These orders may be used in
76 EMERGING_MARKETS_ORIENTED,
77 };
78
79 // Returns which category order to use according to kCategoryOrder feature.
80 CategoryOrderChoice GetSelectedCategoryOrder();
81
68 } // namespace ntp_snippets 82 } // namespace ntp_snippets
69 83
70 #endif // COMPONENTS_NTP_SNIPPETS_FEATURES_H_ 84 #endif // COMPONENTS_NTP_SNIPPETS_FEATURES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698