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

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

Issue 2810053004: [Remote suggestions] Report time distribution of triggers (Closed)
Patch Set: Created 3 years, 8 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 7fe94d6e86c8ca04d273fa5c78caee9d5ea3773b..76c9cbe7f08a462d5b5e98bbed7702298aff69f1 100644
--- a/components/ntp_snippets/remote/remote_suggestions_scheduler_impl.h
+++ b/components/ntp_snippets/remote/remote_suggestions_scheduler_impl.h
@@ -93,7 +93,8 @@ class RemoteSuggestionsSchedulerImpl : public RemoteSuggestionsScheduler {
// Checks whether it is time to perform a soft background fetch, according to
// |schedule|.
- bool ShouldRefetchInTheBackgroundNow();
+ bool ShouldRefetchInTheBackgroundNow(
+ const base::Time& last_fetch_attempt_time);
Marc Treib 2017/04/12 12:48:31 nit: Time is essentially an int64, so it's fine to
jkrcal 2017/04/12 13:26:44 Done.
// Returns whether background fetching (for the given |trigger|) is disabled.
bool BackgroundFetchesDisabled(TriggerType trigger) const;
@@ -144,6 +145,9 @@ class RemoteSuggestionsSchedulerImpl : public RemoteSuggestionsScheduler {
RequestThrottler request_throttler_active_ntp_user_;
RequestThrottler request_throttler_active_suggestions_consumer_;
+ // To make sure we only report the first trigger to UMA.
+ bool time_until_first_trigger_reported_;
+
// We should not fetch in background before EULA gets accepted.
std::unique_ptr<EulaState> eula_state_;

Powered by Google App Engine
This is Rietveld 408576698