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" |
11 | 11 |
12 namespace ntp_snippets { | 12 namespace ntp_snippets { |
13 | 13 |
14 // Features to turn individual providers/categories on/off. | 14 // Features to turn individual providers/categories on/off. |
15 extern const base::Feature kArticleSuggestionsFeature; | 15 extern const base::Feature kArticleSuggestionsFeature; |
16 extern const base::Feature kBookmarkSuggestionsFeature; | 16 extern const base::Feature kBookmarkSuggestionsFeature; |
17 extern const base::Feature kRecentOfflineTabSuggestionsFeature; | 17 extern const base::Feature kRecentOfflineTabSuggestionsFeature; |
18 extern const base::Feature kDownloadSuggestionsFeature; | 18 extern const base::Feature kDownloadSuggestionsFeature; |
19 extern const base::Feature kPhysicalWebPageSuggestionsFeature; | 19 extern const base::Feature kPhysicalWebPageSuggestionsFeature; |
20 extern const base::Feature kForeignSessionsSuggestionsFeature; | 20 extern const base::Feature kForeignSessionsSuggestionsFeature;; |
21 | 21 |
22 // Feature to allow the 'save to offline' option to appear in the snippets | 22 // Feature to allow the 'save to offline' option to appear in the snippets |
23 // context menu. | 23 // context menu. |
24 extern const base::Feature kSaveToOfflineFeature; | 24 extern const base::Feature kSaveToOfflineFeature; |
25 | 25 |
| 26 // Feature to allow dismissing sections. |
| 27 extern const base::Feature kSectionDismissalFeature; |
| 28 |
26 // Global toggle for the whole content suggestions feature. If this is set to | 29 // Global toggle for the whole content suggestions feature. If this is set to |
27 // false, all the per-provider features are ignored. | 30 // false, all the per-provider features are ignored. |
28 extern const base::Feature kContentSuggestionsFeature; | 31 extern const base::Feature kContentSuggestionsFeature; |
29 | 32 |
30 // Returns a feature param as an int instead of a string. | 33 // Returns a feature param as an int instead of a string. |
31 int GetParamAsInt(const base::Feature& feature, | 34 int GetParamAsInt(const base::Feature& feature, |
32 const std::string& param_name, | 35 const std::string& param_name, |
33 int default_value); | 36 int default_value); |
34 | 37 |
35 } // namespace ntp_snippets | 38 } // namespace ntp_snippets |
36 | 39 |
37 #endif // COMPONENTS_NTP_SNIPPETS_FEATURES_H_ | 40 #endif // COMPONENTS_NTP_SNIPPETS_FEATURES_H_ |
OLD | NEW |