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

Unified Diff: components/ntp_snippets/category_info.h

Issue 2249903003: 📰 Empty state handling for the Bookmarks section (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix tests 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/category_info.h
diff --git a/components/ntp_snippets/category_info.h b/components/ntp_snippets/category_info.h
index 0187209fde93f5a2fa2ebb485ce4ad6ec381cc49..1a659ed232da0099d91745ebbbab24c13a25490a 100644
--- a/components/ntp_snippets/category_info.h
+++ b/components/ntp_snippets/category_info.h
@@ -25,7 +25,8 @@ class CategoryInfo {
public:
CategoryInfo(const base::string16& title,
ContentSuggestionsCardLayout card_layout,
- bool has_more_button);
+ bool has_more_button,
+ bool show_if_empty);
CategoryInfo(CategoryInfo&&) = default;
CategoryInfo& operator=(CategoryInfo&&) = default;
@@ -42,10 +43,14 @@ class CategoryInfo {
// action, it queries the provider for more suggestions.
bool has_more_button() const { return has_more_button_; }
+ // Whether this category should be shown if it offers no suggestions.
+ bool show_if_empty() const { return show_if_empty_; }
+
private:
base::string16 title_;
ContentSuggestionsCardLayout card_layout_;
bool has_more_button_;
+ bool show_if_empty_;
DISALLOW_COPY_AND_ASSIGN(CategoryInfo);
};

Powered by Google App Engine
This is Rietveld 408576698