| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 extern const base::Feature kCategoryRanker; | 44 extern const base::Feature kCategoryRanker; |
| 45 | 45 |
| 46 // Feature to allow the new Google favicon server for fetching publisher icons. | 46 // Feature to allow the new Google favicon server for fetching publisher icons. |
| 47 extern const base::Feature kPublisherFaviconsFromNewServerFeature; | 47 extern const base::Feature kPublisherFaviconsFromNewServerFeature; |
| 48 | 48 |
| 49 // Parameter and its values for the kCategoryRanker feature flag. | 49 // Parameter and its values for the kCategoryRanker feature flag. |
| 50 extern const char kCategoryRankerParameter[]; | 50 extern const char kCategoryRankerParameter[]; |
| 51 extern const char kCategoryRankerConstantRanker[]; | 51 extern const char kCategoryRankerConstantRanker[]; |
| 52 extern const char kCategoryRankerClickBasedRanker[]; | 52 extern const char kCategoryRankerClickBasedRanker[]; |
| 53 | 53 |
| 54 // Feature to listen for GCM push updates from the server |
| 55 extern const base::Feature kPushUpdatesFeature; |
| 56 |
| 54 enum class CategoryRankerChoice { | 57 enum class CategoryRankerChoice { |
| 55 CONSTANT, | 58 CONSTANT, |
| 56 CLICK_BASED, | 59 CLICK_BASED, |
| 57 }; | 60 }; |
| 58 | 61 |
| 59 // Returns which CategoryRanker to use according to kCategoryRanker feature. | 62 // Returns which CategoryRanker to use according to kCategoryRanker feature. |
| 60 CategoryRankerChoice GetSelectedCategoryRanker(); | 63 CategoryRankerChoice GetSelectedCategoryRanker(); |
| 61 | 64 |
| 62 // Builds a CategoryRanker according to kCategoryRanker feature. | 65 // Builds a CategoryRanker according to kCategoryRanker feature. |
| 63 std::unique_ptr<CategoryRanker> BuildSelectedCategoryRanker( | 66 std::unique_ptr<CategoryRanker> BuildSelectedCategoryRanker( |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 constexpr int kNotificationsDefaultDailyLimit = 1; | 112 constexpr int kNotificationsDefaultDailyLimit = 1; |
| 110 | 113 |
| 111 // An integer. The number of notifications that can be ignored. If the user | 114 // An integer. The number of notifications that can be ignored. If the user |
| 112 // ignores this many notifications or more, we stop sending them. | 115 // ignores this many notifications or more, we stop sending them. |
| 113 extern const char kNotificationsIgnoredLimitParam[]; | 116 extern const char kNotificationsIgnoredLimitParam[]; |
| 114 constexpr int kNotificationsIgnoredDefaultLimit = 3; | 117 constexpr int kNotificationsIgnoredDefaultLimit = 3; |
| 115 | 118 |
| 116 } // namespace ntp_snippets | 119 } // namespace ntp_snippets |
| 117 | 120 |
| 118 #endif // COMPONENTS_NTP_SNIPPETS_FEATURES_H_ | 121 #endif // COMPONENTS_NTP_SNIPPETS_FEATURES_H_ |
| OLD | NEW |