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

Unified Diff: components/ntp_snippets/content_suggestions_service.h

Issue 2207493002: Add CategoryInfo for meta information of content suggestions Categories (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DCHECK against empty base::Optional<CategoryInfo> in SnippetsInternals Created 4 years, 4 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/content_suggestions_service.h
diff --git a/components/ntp_snippets/content_suggestions_service.h b/components/ntp_snippets/content_suggestions_service.h
index d572b737ec6c4eb4322614f905eae7f04d150c09..454ec31285be638e7e4fcb456e462e093995a568 100644
--- a/components/ntp_snippets/content_suggestions_service.h
+++ b/components/ntp_snippets/content_suggestions_service.h
@@ -12,6 +12,7 @@
#include "base/callback_forward.h"
#include "base/observer_list.h"
+#include "base/optional.h"
#include "components/keyed_service/core/keyed_service.h"
#include "components/ntp_snippets/category_factory.h"
#include "components/ntp_snippets/category_status.h"
@@ -78,6 +79,9 @@ class ContentSuggestionsService : public KeyedService,
// Gets the status of a category.
CategoryStatus GetCategoryStatus(Category category) const;
+ // Gets the meta information of a category.
+ base::Optional<CategoryInfo> GetCategoryInfo(Category category) const;
+
// Gets the available suggestions for a category. The result is empty if the
// category is available and empty, but also if the category is unavailable
// for any reason, see |GetCategoryStatus()|.
« no previous file with comments | « components/ntp_snippets/content_suggestions_provider.h ('k') | components/ntp_snippets/content_suggestions_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698