Chromium Code Reviews| 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> | |
| 9 | |
| 8 #include "base/feature_list.h" | 10 #include "base/feature_list.h" |
| 9 | 11 |
| 10 namespace ntp_snippets { | 12 namespace ntp_snippets { |
| 11 | 13 |
| 12 // Features to turn individual providers/categories on/off. | 14 // Features to turn individual providers/categories on/off. |
| 13 extern const base::Feature kArticleSuggestionsFeature; | 15 extern const base::Feature kArticleSuggestionsFeature; |
| 14 extern const base::Feature kBookmarkSuggestionsFeature; | 16 extern const base::Feature kBookmarkSuggestionsFeature; |
| 15 extern const base::Feature kRecentOfflineTabSuggestionsFeature; | 17 extern const base::Feature kRecentOfflineTabSuggestionsFeature; |
| 16 extern const base::Feature kDownloadSuggestionsFeature; | 18 extern const base::Feature kDownloadSuggestionsFeature; |
| 17 extern const base::Feature kPhysicalWebPageSuggestionsFeature; | 19 extern const base::Feature kPhysicalWebPageSuggestionsFeature; |
| 20 extern const base::Feature kForeignSessionsSuggestionsFeature; | |
| 18 | 21 |
| 19 // 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 |
| 20 // context menu. | 23 // context menu. |
| 21 extern const base::Feature kSaveToOfflineFeature; | 24 extern const base::Feature kSaveToOfflineFeature; |
| 22 | 25 |
| 23 // Global toggle for the whole content suggestions feature. If this is set to | 26 // Global toggle for the whole content suggestions feature. If this is set to |
| 24 // false, all the per-provider features are ignored. | 27 // false, all the per-provider features are ignored. |
| 25 extern const base::Feature kContentSuggestionsFeature; | 28 extern const base::Feature kContentSuggestionsFeature; |
| 26 | 29 |
| 30 // Returns a feature param as an int instead of a string. | |
| 31 int GetParamAsInt(const base::Feature& feature, | |
| 32 const std::string& param_name, | |
| 33 const int default_value); | |
|
Marc Treib
2016/09/16 12:26:48
nit: "const" doesn't do anything here
tschumann
2016/09/16 13:33:20
right. You can keep it in the definition to preven
skym
2016/09/16 18:18:48
Removed from declaration only.
| |
| 34 | |
| 27 } // namespace ntp_snippets | 35 } // namespace ntp_snippets |
| 28 | 36 |
| 29 #endif // COMPONENTS_NTP_SNIPPETS_FEATURES_H_ | 37 #endif // COMPONENTS_NTP_SNIPPETS_FEATURES_H_ |
| OLD | NEW |