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

Unified Diff: chrome/browser/android/ntp/content_suggestions_notifier_service.cc

Issue 2740783004: Cleanup: Remove CategoryStatus::SIGNED_OUT (Closed)
Patch Set: review Created 3 years, 9 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: chrome/browser/android/ntp/content_suggestions_notifier_service.cc
diff --git a/chrome/browser/android/ntp/content_suggestions_notifier_service.cc b/chrome/browser/android/ntp/content_suggestions_notifier_service.cc
index 446e96aef8189e1dbe87189ae32f6f26caafc6f4..8e42f09fc81e4ae9f3df4852e4ac6c9502093ded 100644
--- a/chrome/browser/android/ntp/content_suggestions_notifier_service.cc
+++ b/chrome/browser/android/ntp/content_suggestions_notifier_service.cc
@@ -152,19 +152,9 @@ class ContentSuggestionsNotifierService::NotifyingObserver
if (!category.IsKnownCategory(KnownCategories::ARTICLES)) {
return;
}
- switch (new_status) {
- case CategoryStatus::AVAILABLE:
- case CategoryStatus::AVAILABLE_LOADING:
- break; // nothing to do
- case CategoryStatus::INITIALIZING:
- case CategoryStatus::ALL_SUGGESTIONS_EXPLICITLY_DISABLED:
- case CategoryStatus::CATEGORY_EXPLICITLY_DISABLED:
- case CategoryStatus::LOADING_ERROR:
- case CategoryStatus::NOT_PROVIDED:
- case CategoryStatus::SIGNED_OUT:
- ContentSuggestionsNotificationHelper::HideAllNotifications(
- CONTENT_SUGGESTIONS_HIDE_DISABLED);
- break;
+ if (!ntp_snippets::IsCategoryStatusAvailable(new_status)) {
+ ContentSuggestionsNotificationHelper::HideAllNotifications(
+ CONTENT_SUGGESTIONS_HIDE_DISABLED);
}
}

Powered by Google App Engine
This is Rietveld 408576698