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_CATEGORY_H_ | 5 #ifndef COMPONENTS_NTP_SNIPPETS_CATEGORY_H_ |
6 #define COMPONENTS_NTP_SNIPPETS_CATEGORY_H_ | 6 #define COMPONENTS_NTP_SNIPPETS_CATEGORY_H_ |
7 | 7 |
8 #include <ostream> | 8 #include <ostream> |
9 | 9 |
10 namespace ntp_snippets { | 10 namespace ntp_snippets { |
11 | 11 |
12 class CategoryFactory; | 12 class CategoryFactory; |
13 | 13 |
14 // These are the categories that the client knows about. | 14 // These are the categories that the client knows about. |
15 // The values before LOCAL_CATEGORIES_COUNT are the categories that are provided | 15 // The values before LOCAL_CATEGORIES_COUNT are the categories that are provided |
16 // locally on the device. Categories provided by the server (IDs strictly larger | 16 // locally on the device. Categories provided by the server (IDs strictly larger |
17 // than REMOTE_CATEGORIES_OFFSET) only need to be hard-coded here if they need | 17 // than REMOTE_CATEGORIES_OFFSET) only need to be hard-coded here if they need |
18 // to be recognized by the client implementation. | 18 // to be recognized by the client implementation. |
19 // On Android builds, a Java counterpart will be generated for this enum. | 19 // On Android builds, a Java counterpart will be generated for this enum. |
20 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.ntp.snippets | 20 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.ntp.snippets |
21 // | |
22 // Note: When adding new categories, one should also consider adding a category | |
23 // to histogram suffix mapping to content_suggestions_metrics.cc. | |
Marc Treib
2016/09/16 12:26:48
Thanks! This warning should soon not be needed any
skym
2016/09/16 18:18:47
Sweet, removed!
| |
21 enum class KnownCategories { | 24 enum class KnownCategories { |
22 // Pages recently downloaded during normal navigation. | 25 // Pages recently downloaded during normal navigation. |
23 RECENT_TABS, | 26 RECENT_TABS, |
24 | 27 |
25 // Pages downloaded by the user for offline consumption. | 28 // Pages downloaded by the user for offline consumption. |
26 DOWNLOADS, | 29 DOWNLOADS, |
27 | 30 |
28 // Recently used bookmarks. | 31 // Recently used bookmarks. |
29 BOOKMARKS, | 32 BOOKMARKS, |
30 | 33 |
31 // Physical Web page available in the vicinity. | 34 // Physical Web page available in the vicinity. |
32 PHYSICAL_WEB_PAGES, | 35 PHYSICAL_WEB_PAGES, |
33 | 36 |
37 // Pages recently browsed to on other devices. | |
38 FOREIGN_TABS, | |
39 | |
34 // Follows the last local category. | 40 // Follows the last local category. |
35 LOCAL_CATEGORIES_COUNT, | 41 LOCAL_CATEGORIES_COUNT, |
36 | 42 |
37 REMOTE_CATEGORIES_OFFSET = 10000, | 43 REMOTE_CATEGORIES_OFFSET = 10000, |
38 | 44 |
39 // Articles for you. | 45 // Articles for you. |
40 ARTICLES, | 46 ARTICLES, |
41 }; | 47 }; |
42 | 48 |
43 // A category groups ContentSuggestions which belong together. Use the | 49 // A category groups ContentSuggestions which belong together. Use the |
(...skipping 29 matching lines...) Expand all Loading... | |
73 | 79 |
74 struct Category::CompareByID { | 80 struct Category::CompareByID { |
75 bool operator()(const Category& left, const Category& right) const; | 81 bool operator()(const Category& left, const Category& right) const; |
76 }; | 82 }; |
77 | 83 |
78 std::ostream& operator<<(std::ostream& os, const Category& obj); | 84 std::ostream& operator<<(std::ostream& os, const Category& obj); |
79 | 85 |
80 } // namespace ntp_snippets | 86 } // namespace ntp_snippets |
81 | 87 |
82 #endif // COMPONENTS_NTP_SNIPPETS_CATEGORY_H_ | 88 #endif // COMPONENTS_NTP_SNIPPETS_CATEGORY_H_ |
OLD | NEW |