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

Unified Diff: components/ntp_snippets/category.cc

Issue 2337103003: [NTP Snippets] Metrics: switch over known categories (Closed)
Patch Set: base::underlying_type :-/ Created 4 years, 3 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
« no previous file with comments | « components/ntp_snippets/category.h ('k') | components/ntp_snippets/category_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ntp_snippets/category.cc
diff --git a/components/ntp_snippets/category.cc b/components/ntp_snippets/category.cc
index c9dff3125dfc9c1ecdd92ce433f1c055f43efbe5..abc86ab9f2c71827710d8f2d477ec9206c170991 100644
--- a/components/ntp_snippets/category.cc
+++ b/components/ntp_snippets/category.cc
@@ -4,11 +4,15 @@
#include "components/ntp_snippets/category.h"
+#include "base/logging.h"
+
namespace ntp_snippets {
Category::Category(int id) : id_(id) {}
bool Category::IsKnownCategory(KnownCategories known_category) const {
+ DCHECK_NE(known_category, KnownCategories::LOCAL_CATEGORIES_COUNT);
+ DCHECK_NE(known_category, KnownCategories::REMOTE_CATEGORIES_OFFSET);
return id_ == static_cast<int>(known_category);
}
« no previous file with comments | « components/ntp_snippets/category.h ('k') | components/ntp_snippets/category_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698