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

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

Issue 2599743002: Trigger the Snippets Scheduler when Resuming Activities (Closed)
Patch Set: Rebase Created 3 years, 11 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 953592ae461dce70fdfd2e9a78a89e0511ece865..7621161a824faf344f39462ac0f59acfc379db69 100644
--- a/components/ntp_snippets/remote/remote_suggestions_scheduler.h
+++ b/components/ntp_snippets/remote/remote_suggestions_scheduler.h
@@ -13,7 +13,16 @@ namespace ntp_snippets {
class RemoteSuggestionsScheduler {
public:
// External triggers to consider fetching content suggestions.
- virtual void OnBrowserStartup() = 0;
+
+ // Called whenever chrome is started warm or the user switches to Chrome.
+ virtual void OnBrowserForegrounded() = 0;
+
+ // Called whenever chrome is cold started.
+ // To keep start ups fast, defer any work possible.
+ virtual void OnBrowserColdStart() = 0;
+
+ // Called whenever a new NTP is opened. This may be called on cold starts.
+ // So to keep start ups fast, defer heavy work for cold starts.
virtual void OnNTPOpened() = 0;
// Fetch content suggestions.

Powered by Google App Engine
This is Rietveld 408576698