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

Unified Diff: components/ntp_snippets/remote/remote_suggestions_scheduler.h

Issue 2702223004: [Remote suggestions] Move all decisions to fetch to the scheduler (Closed)
Patch Set: Tim's comments #2 Created 3 years, 10 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/remote/remote_suggestions_scheduler.h
diff --git a/components/ntp_snippets/remote/remote_suggestions_scheduler.h b/components/ntp_snippets/remote/remote_suggestions_scheduler.h
index 7621161a824faf344f39462ac0f59acfc379db69..1c10ec3e34177ef338cb5b1a0811dda6e31a09e6 100644
--- a/components/ntp_snippets/remote/remote_suggestions_scheduler.h
+++ b/components/ntp_snippets/remote/remote_suggestions_scheduler.h
@@ -12,6 +12,23 @@ namespace ntp_snippets {
// Interface for informing the scheduler.
class RemoteSuggestionsScheduler {
public:
+ // Internal triggers to consider fetching content suggestions.
+
+ // Called whenever the remote suggestions provider becomes active (on startup,
+ // or later on).
+ virtual void OnProviderActivated() = 0;
+
+ // Called whenever the remote suggestions provider becomes inactive (on
+ // startup, or later on).
+ virtual void OnProviderInactivated() = 0;
+
+ // Called whenever the remote suggestions provider clears all suggestions.
+ virtual void OnSuggestionsCleared() = 0;
+
+ // Called whenever the remote suggestions provider clears all suggestions
+ // because history gets cleared (and we must not show them any more).
+ virtual void OnHistoryCleared() = 0;
+
// External triggers to consider fetching content suggestions.
// Called whenever chrome is started warm or the user switches to Chrome.

Powered by Google App Engine
This is Rietveld 408576698