| Index: chromeos/dbus/system_clock_client.h
|
| diff --git a/chromeos/dbus/system_clock_client.h b/chromeos/dbus/system_clock_client.h
|
| index 849612db46b8b8f6368c3f48a515e19d0d8eb1a0..1757853950f57f68eb23ecd1dacd9b2e68188426 100644
|
| --- a/chromeos/dbus/system_clock_client.h
|
| +++ b/chromeos/dbus/system_clock_client.h
|
| @@ -5,7 +5,7 @@
|
| #ifndef CHROMEOS_DBUS_SYSTEM_CLOCK_CLIENT_H_
|
| #define CHROMEOS_DBUS_SYSTEM_CLOCK_CLIENT_H_
|
|
|
| -#include "base/observer_list.h"
|
| +#include "base/callback.h"
|
| #include "chromeos/chromeos_export.h"
|
| #include "chromeos/dbus/dbus_client.h"
|
|
|
| @@ -18,19 +18,31 @@ class CHROMEOS_EXPORT SystemClockClient : public DBusClient {
|
| class Observer {
|
| public:
|
| // Called when the status is updated.
|
| - virtual void SystemClockUpdated() {}
|
| + virtual void SystemClockUpdated();
|
| +
|
| + // Called when the system clock has become settable or unsettable, e.g.,
|
| + // when the clock syncs with or goes out of sync with the network.
|
| + virtual void SystemClockCanSetTimeChanged(bool can_set_time);
|
| +
|
| protected:
|
| virtual ~Observer() {}
|
| };
|
|
|
| virtual ~SystemClockClient();
|
|
|
| - // Adds and removes the observer.
|
| + // Adds the given observer.
|
| virtual void AddObserver(Observer* observer) = 0;
|
| + // Removes the given observer if this object has the observer.
|
| virtual void RemoveObserver(Observer* observer) = 0;
|
| // Returns true if this object has the given observer.
|
| virtual bool HasObserver(Observer* observer) = 0;
|
|
|
| + // Sets the system clock.
|
| + virtual void SetTime(int64 time_in_seconds) = 0;
|
| +
|
| + // Checks if the system time can be set.
|
| + virtual bool CanSetTime() = 0;
|
| +
|
| // Creates the instance.
|
| static SystemClockClient* Create();
|
|
|
|
|