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

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

Issue 2875953003: [Soft fetches] Set-up different intervals for <Chrome started> events. (Closed)
Patch Set: Markus' comments Created 3 years, 7 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_impl.h
diff --git a/components/ntp_snippets/remote/remote_suggestions_scheduler_impl.h b/components/ntp_snippets/remote/remote_suggestions_scheduler_impl.h
index 9921f51489adfa7813a603af9077d42b1c2a4b24..3e103624bec7839a219a6effa4097edc3e012980 100644
--- a/components/ntp_snippets/remote/remote_suggestions_scheduler_impl.h
+++ b/components/ntp_snippets/remote/remote_suggestions_scheduler_impl.h
@@ -71,8 +71,10 @@ class RemoteSuggestionsSchedulerImpl : public RemoteSuggestionsScheduler {
base::TimeDelta interval_persistent_wifi;
base::TimeDelta interval_persistent_fallback;
- base::TimeDelta interval_soft_wifi;
- base::TimeDelta interval_soft_fallback;
+ base::TimeDelta interval_startup_wifi;
+ base::TimeDelta interval_startup_fallback;
+ base::TimeDelta interval_shown_wifi;
+ base::TimeDelta interval_shown_fallback;
};
enum class TriggerType;
@@ -91,9 +93,10 @@ class RemoteSuggestionsSchedulerImpl : public RemoteSuggestionsScheduler {
// timing is appropriate for another fetch.
void RefetchInTheBackgroundIfAppropriate(TriggerType trigger);
- // Checks whether it is time to perform a soft background fetch, according to
- // |schedule|.
- bool ShouldRefetchInTheBackgroundNow(base::Time last_fetch_attempt_time);
+ // Checks whether it is time to perform a soft background fetch for |trigger|,
+ // according to |schedule|.
+ bool ShouldRefetchInTheBackgroundNow(base::Time last_fetch_attempt_time,
+ TriggerType trigger);
// Returns whether background fetching (for the given |trigger|) is disabled.
bool BackgroundFetchesDisabled(TriggerType trigger) const;

Powered by Google App Engine
This is Rietveld 408576698