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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusListItem.java

Issue 2190353002: 📰Fix SnippetsService's status reporting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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: chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusListItem.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusListItem.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusListItem.java
index 599d94a56352fe8d525a2000910cbeb7ce383a87..1fea2bc809983958cb54b22608d39a8789e19391 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusListItem.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusListItem.java
@@ -190,13 +190,18 @@ public static StatusListItem create(
int categoryStatus, NewTabPageAdapter adapter, NewTabPageManager manager) {
switch (categoryStatus) {
case ContentSuggestionsCategoryStatus.AVAILABLE:
+ Log.d("DGN", "StatusListItem#create(AVAILABLE)");
+ return new NoSnippets(adapter);
case ContentSuggestionsCategoryStatus.AVAILABLE_LOADING:
+ Log.d("DGN", "StatusListItem#create(AVAILABLE_LOADING)");
return new NoSnippets(adapter);
case ContentSuggestionsCategoryStatus.SIGNED_OUT:
+ Log.d("DGN", "StatusListItem#create(SIGNED_OUT)");
return new SignedOut();
case ContentSuggestionsCategoryStatus.SYNC_DISABLED:
+ Log.d("DGN", "StatusListItem#create(SYNC_DISABLED)");
return new SyncDisabled();
case ContentSuggestionsCategoryStatus.PASSPHRASE_ENCRYPTION_ENABLED:
@@ -208,7 +213,10 @@ public static StatusListItem create(
// TODO(dgn): If we add a spinner at some point (e.g. to show that we are fetching
// snippets) we could use it here too.
case ContentSuggestionsCategoryStatus.INITIALIZING:
+ Log.d("DGN", "StatusListItem#create(INITIALIZING)");
+ return new HistorySyncDisabled();
case ContentSuggestionsCategoryStatus.HISTORY_SYNC_DISABLED:
+ Log.d("DGN", "StatusListItem#create(HISTORY_SYNC_DISABLED)");
return new HistorySyncDisabled();
case ContentSuggestionsCategoryStatus.ALL_SUGGESTIONS_EXPLICITLY_DISABLED:
« no previous file with comments | « no previous file | components/ntp_snippets/ntp_snippets_service.cc » ('j') | components/ntp_snippets/ntp_snippets_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698