1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_UKM_METRICS_REPORTING_SCHEDULER_H_
6 #define COMPONENTS_UKM_METRICS_REPORTING_SCHEDULER_H_
8 #include "base/time/time.h"
9 #include "components/metrics/metrics_rotation_scheduler.h"
13 // Scheduler to drive a UkmService object's log rotations.
14 class UkmRotationScheduler : public metrics::MetricsRotationScheduler {
16 // Creates UkmRotationScheduler object with the given |rotation_callback|
17 // callback to call when log rotation should happen and |interval_callback|
18 // to determine the interval between rotations in steady state.
20 const base::Closure& rotation_callback,
21 const base::Callback<base::TimeDelta(void)>& interval_callback);
22 ~UkmRotationScheduler() override;
25 // Record the init sequence order histogram.
26 void LogMetricsInitSequence(InitSequence sequence) override;
28 DISALLOW_COPY_AND_ASSIGN(UkmRotationScheduler);
33 #endif // COMPONENTS_UKM_METRICS_REPORTING_SCHEDULER_H_