Index: chrome/browser/ui/webui/snippets_internals_message_handler.cc |
diff --git a/chrome/browser/ui/webui/snippets_internals_message_handler.cc b/chrome/browser/ui/webui/snippets_internals_message_handler.cc |
index c4079db89af185f10db7a1549b345b0366dc845e..fd306b6838d14d5182c2d24439f79f371cb87f43 100644 |
--- a/chrome/browser/ui/webui/snippets_internals_message_handler.cc |
+++ b/chrome/browser/ui/webui/snippets_internals_message_handler.cc |
@@ -29,6 +29,7 @@ |
using ntp_snippets::ContentSuggestion; |
using ntp_snippets::ContentSuggestionsCategory; |
using ntp_snippets::ContentSuggestionsCategoryStatus; |
+using ntp_snippets::KnownSuggestionsCategories; |
namespace { |
@@ -75,13 +76,12 @@ std::unique_ptr<base::DictionaryValue> PrepareSuggestion( |
} |
std::string MapCategoryName(ContentSuggestionsCategory category) { |
Marc Treib
2016/07/28 11:41:45
Should this be called GetCategoryName? Not sure wh
Philipp Keck
2016/07/28 13:50:53
Done. GetCategoryTitle.
Marc Treib
2016/07/28 14:31:16
It's not actually the title though, it's just a de
|
- switch (category) { |
- case ContentSuggestionsCategory::ARTICLES: |
- return "Articles"; |
- case ContentSuggestionsCategory::OFFLINE_PAGES: |
- return "Offline pages (continue browsing)"; |
- case ContentSuggestionsCategory::COUNT: |
- NOTREACHED() << "Category::COUNT must not be used as a value"; |
+ // TODO(pke): Replace this with the category's title. |
Marc Treib
2016/07/28 11:41:45
I guess this should be a comment on the function?
Philipp Keck
2016/07/28 13:50:53
Done.
|
+ if (category == KnownSuggestionsCategories::ARTICLES) { |
+ return "Articles"; |
+ } |
+ if (category == KnownSuggestionsCategories::OFFLINE_PAGES) { |
+ return "Offline pages (continue browsing)"; |
} |
return std::string(); |
} |