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

Unified Diff: components/ntp_snippets/remote/remote_suggestions_provider.cc

Issue 2519053002: 📰 Let the backend trigger sign in related refreshes (Closed)
Patch Set: Created 4 years, 1 month 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/remote/remote_suggestions_provider.cc
diff --git a/components/ntp_snippets/remote/remote_suggestions_provider.cc b/components/ntp_snippets/remote/remote_suggestions_provider.cc
index f1f084a74824cce228753991bbbc2cca68cb0794..49a59907f55bd8cf49ed6a4e5d596154c7c733b0 100644
--- a/components/ntp_snippets/remote/remote_suggestions_provider.cc
+++ b/components/ntp_snippets/remote/remote_suggestions_provider.cc
@@ -490,6 +490,16 @@ void RemoteSuggestionsProvider::ClearCachedSuggestions(Category category) {
NotifyNewSuggestions(category, *content);
}
+void RemoteSuggestionsProvider::OnSignInStateChanged() {
+ // Make sure the status service is registered and we already initialised its
+ // start state.
+ if (!initialized()) {
+ return;
+ }
+
+ snippets_status_service_->OnSignInStateChanged();
+}
+
void RemoteSuggestionsProvider::GetDismissedSuggestionsForDebugging(
Category category,
const DismissedSuggestionsCallback& callback) {

Powered by Google App Engine
This is Rietveld 408576698