[Remote suggestions] Move the throttler to SchedulingRemoteSuggestionsProvider |
|||
Issue descriptionAs the scheduling provider is the central place to control when we fetch, it should logically also contain the throttler for these fetches. This change also makes fetching pref-free, which will in turn allow us to use the new I/O scheduler for prioritizing the fetches.
,
Feb 20 2017
,
Mar 2 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0a06fdaf8ba732ae795bcb1f2331523babc88dd8 commit 0a06fdaf8ba732ae795bcb1f2331523babc88dd8 Author: jkrcal <jkrcal@chromium.org> Date: Thu Mar 02 15:05:50 2017 [Remote suggestions] Move the throttler into the Scheduler This CL moves the throttler into the Scheduler -- which is now the central place to decide whether to and when to fetch. This change also helps in employing I/O scheduler in the Scheduler for prioritization of background fethes. I/O scheduler tasks cannot run on the main thread and thus cannot use PrefService. As throttler depends on prefs, the easiest way is to ask for quota before posting the task to I/O scheduler. This change removes the quota_error fetch status reporting from UMA. This is no problem as all the quota requests are reported to UMA from the throttler anyway. BUG= 694325 Review-Url: https://codereview.chromium.org/2714863004 Cr-Commit-Position: refs/heads/master@{#454258} [modify] https://crrev.com/0a06fdaf8ba732ae795bcb1f2331523babc88dd8/components/ntp_snippets/remote/json_request.h [modify] https://crrev.com/0a06fdaf8ba732ae795bcb1f2331523babc88dd8/components/ntp_snippets/remote/remote_suggestions_fetcher.cc [modify] https://crrev.com/0a06fdaf8ba732ae795bcb1f2331523babc88dd8/components/ntp_snippets/remote/remote_suggestions_fetcher.h [modify] https://crrev.com/0a06fdaf8ba732ae795bcb1f2331523babc88dd8/components/ntp_snippets/remote/remote_suggestions_fetcher_unittest.cc [modify] https://crrev.com/0a06fdaf8ba732ae795bcb1f2331523babc88dd8/components/ntp_snippets/remote/remote_suggestions_provider.h [modify] https://crrev.com/0a06fdaf8ba732ae795bcb1f2331523babc88dd8/components/ntp_snippets/remote/scheduling_remote_suggestions_provider.cc [modify] https://crrev.com/0a06fdaf8ba732ae795bcb1f2331523babc88dd8/components/ntp_snippets/remote/scheduling_remote_suggestions_provider.h [modify] https://crrev.com/0a06fdaf8ba732ae795bcb1f2331523babc88dd8/components/ntp_snippets/remote/scheduling_remote_suggestions_provider_unittest.cc [modify] https://crrev.com/0a06fdaf8ba732ae795bcb1f2331523babc88dd8/tools/metrics/histograms/histograms.xml
,
Mar 3 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by jkrcal@chromium.org
, Feb 20 2017