Chromium Code Reviews| Index: components/metrics/daily_observer.h |
| diff --git a/components/metrics/daily_observer.h b/components/metrics/daily_observer.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..1705a2088fedc2d35cba36fc409ba82b3f3eb82a |
| --- /dev/null |
| +++ b/components/metrics/daily_observer.h |
| @@ -0,0 +1,29 @@ |
| +// Copyright 2014 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 COMPONENTS_METRICS_DAILY_OBSERVER_H_ |
| +#define COMPONENTS_METRICS_DAILY_OBSERVER_H_ |
| + |
| +#include "base/macros.h" |
| + |
| +namespace metrics { |
| + |
| +// DailyObserver receives notifications from a DailyInterval. |
|
Alexei Svitkine (slow)
2014/09/15 17:50:38
For an interface this simple, I suggest defining i
Steven Holte
2014/09/15 20:17:10
Done.
|
| +// Observers must be added before the DailyInterval begins checking time, |
| +// and will be owned by the DailyInterval. |
| +class DailyObserver { |
| + public: |
| + DailyObserver(); |
| + virtual ~DailyObserver(); |
| + |
| + // Called when daily metrics should be collected. |
| + virtual void OnDailyInterval() = 0; |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(DailyObserver); |
| +}; |
| + |
| +} // namespace metrics |
| + |
| +#endif // COMPONENTS_METRICS_DAILY_OBSERVER_H_ |