Only fsync leveldb's directory when the manifest is being updated.
[chromium-blink-merge.git] / chromeos / dbus / system_clock_client.h
blob38158dae1084ce74c8a63227d7da4024ea13089d
1 // Copyright (c) 2013 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 CHROMEOS_DBUS_SYSTEM_CLOCK_CLIENT_H_
6 #define CHROMEOS_DBUS_SYSTEM_CLOCK_CLIENT_H_
8 #include "base/observer_list.h"
9 #include "chromeos/chromeos_export.h"
10 #include "chromeos/dbus/dbus_client_implementation_type.h"
12 namespace dbus {
13 class Bus;
14 } // namespace
16 namespace chromeos {
18 // SystemClockClient is used to communicate with the system clock.
19 class CHROMEOS_EXPORT SystemClockClient {
20 public:
21 // Interface for observing changes from the system clock.
22 class Observer {
23 public:
24 // Called when the status is updated.
25 virtual void SystemClockUpdated() {}
26 protected:
27 virtual ~Observer() {}
30 virtual ~SystemClockClient();
32 // Adds and removes the observer.
33 virtual void AddObserver(Observer* observer) = 0;
34 virtual void RemoveObserver(Observer* observer) = 0;
35 // Returns true if this object has the given observer.
36 virtual bool HasObserver(Observer* observer) = 0;
38 // Creates the instance.
39 static SystemClockClient* Create(DBusClientImplementationType type,
40 dbus::Bus* bus);
42 protected:
43 // Create() should be used instead.
44 SystemClockClient();
46 private:
47 DISALLOW_COPY_AND_ASSIGN(SystemClockClient);
50 } // namespace chromeos
52 #endif // CHROMEOS_DBUS_SYSTEM_CLOCK_CLIENT_H_