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

Unified Diff: components/ntp_snippets/content_suggestions_category_status.cc

Issue 2158883002: Change NTPSnippetsBridge to read from ContentSuggestionsService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@offlinepagesprovider
Patch Set: Rebase Created 4 years, 5 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_category_status.cc
diff --git a/components/ntp_snippets/content_suggestions_category_status.cc b/components/ntp_snippets/content_suggestions_category_status.cc
index 7c7b86667303813763244c3cc5cecd5fea700859..83f9c54795b92174fcb74b22126b65f8514b9ee6 100644
--- a/components/ntp_snippets/content_suggestions_category_status.cc
+++ b/components/ntp_snippets/content_suggestions_category_status.cc
@@ -8,8 +8,16 @@ namespace ntp_snippets {
bool IsContentSuggestionsCategoryStatusAvailable(
ContentSuggestionsCategoryStatus status) {
+ // Note: This code is duplicated in SnippetsBridge.java.
return status == ContentSuggestionsCategoryStatus::AVAILABLE_LOADING ||
status == ContentSuggestionsCategoryStatus::AVAILABLE;
}
+bool IsContentSuggestionsCategoryStatusInitOrAvailable(
+ ContentSuggestionsCategoryStatus status) {
+ // Note: This code is duplicated in SnippetsBridge.java.
+ return status == ContentSuggestionsCategoryStatus::INITIALIZING ||
+ IsContentSuggestionsCategoryStatusAvailable(status);
+}
+
} // namespace ntp_snippets

Powered by Google App Engine
This is Rietveld 408576698