Index: components/ntp_snippets/category.h |
diff --git a/components/ntp_snippets/category.h b/components/ntp_snippets/category.h |
index 524986fb3b8e5af8b93a02bc87cf341d80d80a00..49b50d0e15791ee9921e520fb819c9e93f25ff42 100644 |
--- a/components/ntp_snippets/category.h |
+++ b/components/ntp_snippets/category.h |
@@ -16,6 +16,7 @@ class CategoryFactory; |
// locally on the device. Categories provided by the server (IDs strictly larger |
// than REMOTE_CATEGORIES_OFFSET) only need to be hard-coded here if they need |
// to be recognized by the client implementation. |
+// NOTE: If you add an entry here, also add it to |IsAnyKnownCategory|. |
// On Android builds, a Java counterpart will be generated for this enum. |
// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.ntp.snippets |
enum class KnownCategories { |
@@ -55,8 +56,12 @@ class Category { |
// the application, so they should not be persisted. |
int id() const { return id_; } |
+ // Returns whether this category matches the given |known_category|. |
bool IsKnownCategory(KnownCategories known_category) const; |
+ // Returns whether this category is any of the known categories. |
jkrcal
2016/09/13 16:08:05
Without looking in the implementation, I would not
Marc Treib
2016/09/13 16:28:50
Added, except for the "except..." part. It should
jkrcal
2016/09/13 17:22:28
Agreed, thanks.
|
+ bool IsAnyKnownCategory() const; |
+ |
private: |
friend class CategoryFactory; |