summaryrefslogtreecommitdiffstats
path: root/ash/periodic_metrics_recorder.h
blob: 9b081ab2aa2d3c072dbbfa326440eda2e4ff08c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef ASH_PERIODIC_METRICS_RECORDER_H_
#define ASH_PERIODIC_METRICS_RECORDER_H_

#include "base/timer/timer.h"

namespace ash {

// Periodic Metrics Recorder provides a repeating callback (RecordMetrics)
// on a timer to allow recording of state data over time to the UMA records.
// Any additional states (in ash) that require monitoring can be added to
// this class.
class PeriodicMetricsRecorder {
 public:
  PeriodicMetricsRecorder();
  ~PeriodicMetricsRecorder();

 private:
  void RecordMetrics();

  base::RepeatingTimer<PeriodicMetricsRecorder> timer_;
};

}  // namespace ash

#endif  // ASH_PERIODIC_METRICS_RECORDER_H_