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

Unified Diff: components/ntp_snippets/ntp_snippets_service.cc

Issue 2191343002: 📰 Remove SnippetService's dependency on Sync (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update some doc, show NO_SNIPPETS instead of SIGNIN when during INITIALIZING state 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/ntp_snippets_service.cc
diff --git a/components/ntp_snippets/ntp_snippets_service.cc b/components/ntp_snippets/ntp_snippets_service.cc
index a2cf72c8713c9943f2b19b92e1ee1fe5a8e6b008..c9c3441405458e2bb7981fcd4e68f6519f716515 100644
--- a/components/ntp_snippets/ntp_snippets_service.cc
+++ b/components/ntp_snippets/ntp_snippets_service.cc
@@ -718,15 +718,6 @@ void NTPSnippetsService::OnDisabledReasonChanged(
EnterState(State::READY, ContentSuggestionsCategoryStatus::AVAILABLE);
break;
- case DisabledReason::HISTORY_SYNC_STATE_UNKNOWN:
- // HistorySync is not initialized yet, so we don't know what the actual
- // state is and we just return the current one. If things change,
- // |OnStateChanged| will call this function again to update the state.
- DVLOG(1) << "Sync configuration incomplete, continuing based on the "
- "current state.";
- EnterState(state_, ContentSuggestionsCategoryStatus::INITIALIZING);
- break;
-
case DisabledReason::EXPLICITLY_DISABLED:
EnterState(
State::DISABLED,
@@ -736,22 +727,6 @@ void NTPSnippetsService::OnDisabledReasonChanged(
case DisabledReason::SIGNED_OUT:
EnterState(State::DISABLED, ContentSuggestionsCategoryStatus::SIGNED_OUT);
break;
-
- case DisabledReason::SYNC_DISABLED:
- EnterState(State::DISABLED,
- ContentSuggestionsCategoryStatus::SYNC_DISABLED);
- break;
-
- case DisabledReason::PASSPHRASE_ENCRYPTION_ENABLED:
- EnterState(
- State::DISABLED,
- ContentSuggestionsCategoryStatus::PASSPHRASE_ENCRYPTION_ENABLED);
- break;
-
- case DisabledReason::HISTORY_SYNC_DISABLED:
- EnterState(State::DISABLED,
- ContentSuggestionsCategoryStatus::HISTORY_SYNC_DISABLED);
- break;
}
}
« no previous file with comments | « components/ntp_snippets/ntp_snippets_service.h ('k') | components/ntp_snippets/ntp_snippets_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698