Chromium Code Reviews| Index: components/metrics/metrics_reporting_scheduler.h |
| diff --git a/components/metrics/metrics_reporting_scheduler.h b/components/metrics/metrics_reporting_scheduler.h |
| index ddfe651d3ee29f3f87b26fbd729ed723592fc635..87df4e22f91dce345cf1e842216366b70e1e69ec 100644 |
| --- a/components/metrics/metrics_reporting_scheduler.h |
| +++ b/components/metrics/metrics_reporting_scheduler.h |
| @@ -18,11 +18,12 @@ namespace metrics { |
| class MetricsReportingScheduler { |
| public: |
| // Creates MetricsServiceScheduler object with the given |upload_callback| |
| - // callback to call when uploading should happen and |cellular_callback| |
| - // callback to get current network connection type. |
| + // callback to call when uploading should happen and |
| + // |upload_interval_callback| to determine the interval between uploads |
| + // in steady state. |
| MetricsReportingScheduler( |
| const base::Closure& upload_callback, |
| - const base::Callback<void(bool*)>& cellular_callback); |
| + const base::Callback<base::TimeDelta(void)>& upload_interval_callback); |
| ~MetricsReportingScheduler(); |
| // Starts scheduling uploads. This in a no-op if the scheduler is already |
| @@ -57,11 +58,13 @@ class MetricsReportingScheduler { |
| // where the server is having issues. |
| void BackOffUploadInterval(); |
| - // Returns upload interval based on the system and experiment that the user is |
| - // assigned to. |
| + // Returns upload interval to use in steady state. |
| + base::TimeDelta GetStandardUploadInterval(); |
| + |
| + // Returns upload interval specified for the current experiment running. |
| // TODO(gayane): Only for experimenting with upload interval for Android |
| // (bug: 17391128). Should be removed once the experiments are done. |
| - base::TimeDelta GetStandardUploadInterval(); |
| + base::TimeDelta GetUploadIntervalFromExperiment(); |
|
Alexei Svitkine (slow)
2015/03/09 17:26:17
This can be removed - see my other comment.
gunsch
2015/03/13 00:50:12
Done.
|
| // The MetricsService method to call when uploading should happen. |
| const base::Closure upload_callback_; |
| @@ -90,8 +93,8 @@ class MetricsReportingScheduler { |
| // has been completed. |
| bool waiting_for_init_task_complete_; |
| - // Callback function used to get current network connection type. |
| - base::Callback<void(bool*)> cellular_callback_; |
| + // Callback function used to get the standard upload time. |
| + base::Callback<base::TimeDelta(void)> upload_interval_callback_; |
| DISALLOW_COPY_AND_ASSIGN(MetricsReportingScheduler); |
| }; |