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_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 { |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 44 | 44 |
| 45 // Follows the last local category. | 45 // Follows the last local category. |
| 46 LOCAL_CATEGORIES_COUNT, | 46 LOCAL_CATEGORIES_COUNT, |
| 47 | 47 |
| 48 // Remote categories come after this. | 48 // Remote categories come after this. |
| 49 REMOTE_CATEGORIES_OFFSET = 10000, | 49 REMOTE_CATEGORIES_OFFSET = 10000, |
| 50 | 50 |
| 51 // Articles for you. | 51 // Articles for you. |
| 52 ARTICLES, | 52 ARTICLES, |
| 53 | 53 |
| 54 // Breaking News | |
| 55 BREAKING_NEWS, | |
|
sfiera
2017/06/08 13:37:16
Please add BREAKING_NEWS to SuggestionsCategoryId
mamir
2017/06/08 15:20:06
Done.
| |
| 54 // ****************** INSERT NEW REMOTE CATEGORIES HERE! ****************** | 56 // ****************** INSERT NEW REMOTE CATEGORIES HERE! ****************** |
| 55 | 57 |
| 56 // Tracks the last known remote category | 58 // Tracks the last known remote category |
| 57 LAST_KNOWN_REMOTE_CATEGORY = ARTICLES, | 59 LAST_KNOWN_REMOTE_CATEGORY = ARTICLES, |
| 58 }; | 60 }; |
| 59 | 61 |
| 60 // A category groups ContentSuggestions which belong together. Use the | 62 // A category groups ContentSuggestions which belong together. Use the |
| 61 // CategoryFactory to obtain instances. | 63 // CategoryFactory to obtain instances. |
| 62 class Category { | 64 class Category { |
| 63 public: | 65 public: |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 106 | 108 |
| 107 struct Category::CompareByID { | 109 struct Category::CompareByID { |
| 108 bool operator()(const Category& left, const Category& right) const; | 110 bool operator()(const Category& left, const Category& right) const; |
| 109 }; | 111 }; |
| 110 | 112 |
| 111 std::ostream& operator<<(std::ostream& os, const Category& obj); | 113 std::ostream& operator<<(std::ostream& os, const Category& obj); |
| 112 | 114 |
| 113 } // namespace ntp_snippets | 115 } // namespace ntp_snippets |
| 114 | 116 |
| 115 #endif // COMPONENTS_NTP_SNIPPETS_CATEGORY_H_ | 117 #endif // COMPONENTS_NTP_SNIPPETS_CATEGORY_H_ |
| OLD | NEW |