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

Unified Diff: components/ntp_snippets/category.cc

Issue 2406573002: 📰 Persist category dismissals (Closed)
Patch Set: ready for review Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: components/ntp_snippets/category.cc
diff --git a/components/ntp_snippets/category.cc b/components/ntp_snippets/category.cc
index abc86ab9f2c71827710d8f2d477ec9206c170991..9a1aa6a34d079ecdd7b0e1800618d98da4ba00e8 100644
--- a/components/ntp_snippets/category.cc
+++ b/components/ntp_snippets/category.cc
@@ -16,6 +16,10 @@ bool Category::IsKnownCategory(KnownCategories known_category) const {
return id_ == static_cast<int>(known_category);
}
+bool Category::IsRemote() const {
+ return id_ > static_cast<int>(KnownCategories::REMOTE_CATEGORIES_OFFSET);
+}
+
bool operator==(const Category& left, const Category& right) {
return left.id() == right.id();
}

Powered by Google App Engine
This is Rietveld 408576698