Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(304)

Side by Side Diff: components/ntp_snippets/category.h

Issue 2678343004: [Suggestions category] Warn more about removing categories. (Closed)
Patch Set: Comments Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | components/ntp_snippets/category.cc » ('j') | components/ntp_snippets/category.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 15 matching lines...) Expand all
26 DOWNLOADS, 26 DOWNLOADS,
27 27
28 // Recently used bookmarks. 28 // Recently used bookmarks.
29 BOOKMARKS, 29 BOOKMARKS,
30 30
31 // Physical Web page available in the vicinity. 31 // Physical Web page available in the vicinity.
32 PHYSICAL_WEB_PAGES, 32 PHYSICAL_WEB_PAGES,
33 33
34 // Pages recently browsed to on other devices. 34 // Pages recently browsed to on other devices.
35 FOREIGN_TABS, 35 FOREIGN_TABS,
36 // INSERT NEW LOCAL CATEGORIES HERE! 36
37 // ****************** INSERT NEW LOCAL CATEGORIES HERE! ******************
38 // Existing categories are persisted and they must never be removed. This may
39 // happen implicitly, e.g.when an older version without some local category is
vitaliii 2017/02/08 10:18:25 nit: s/e.g.when/e.g. when (missing space)
jkrcal 2017/02/08 10:30:24 Done.
40 // installed.
37 41
38 // Follows the last local category. 42 // Follows the last local category.
39 LOCAL_CATEGORIES_COUNT, 43 LOCAL_CATEGORIES_COUNT,
40 44
41 // Remote categories come after this. 45 // Remote categories come after this.
42 REMOTE_CATEGORIES_OFFSET = 10000, 46 REMOTE_CATEGORIES_OFFSET = 10000,
43 47
44 // Articles for you. 48 // Articles for you.
45 ARTICLES, 49 ARTICLES,
46 // INSERT NEW REMOTE CATEGORIES HERE! 50
51 // ****************** INSERT NEW REMOTE CATEGORIES HERE! ******************
47 52
48 // Tracks the last known remote category 53 // Tracks the last known remote category
49 LAST_KNOWN_REMOTE_CATEGORY = ARTICLES, 54 LAST_KNOWN_REMOTE_CATEGORY = ARTICLES,
50 }; 55 };
51 56
52 // A category groups ContentSuggestions which belong together. Use the 57 // A category groups ContentSuggestions which belong together. Use the
53 // CategoryFactory to obtain instances. 58 // CategoryFactory to obtain instances.
54 class Category { 59 class Category {
55 public: 60 public:
56 // An arbitrary but consistent ordering. Can be used to look up categories in 61 // An arbitrary but consistent ordering. Can be used to look up categories in
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 103
99 struct Category::CompareByID { 104 struct Category::CompareByID {
100 bool operator()(const Category& left, const Category& right) const; 105 bool operator()(const Category& left, const Category& right) const;
101 }; 106 };
102 107
103 std::ostream& operator<<(std::ostream& os, const Category& obj); 108 std::ostream& operator<<(std::ostream& os, const Category& obj);
104 109
105 } // namespace ntp_snippets 110 } // namespace ntp_snippets
106 111
107 #endif // COMPONENTS_NTP_SNIPPETS_CATEGORY_H_ 112 #endif // COMPONENTS_NTP_SNIPPETS_CATEGORY_H_
OLDNEW
« no previous file with comments | « no previous file | components/ntp_snippets/category.cc » ('j') | components/ntp_snippets/category.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698