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

Unified Diff: components/metrics/metrics_reporting_scheduler.h

Issue 979363003: UMA: use a more frequent upload interval for Chromecast. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: adds upload interval to client Created 5 years, 9 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/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);
};

Powered by Google App Engine
This is Rietveld 408576698