Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5118)

Unified Diff: chromeos/dbus/system_clock_client.h

Issue 247663003: Date and Time dialog for when the clock isn't synced. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, single quotes in browsertest js Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromeos/dbus/fake_system_clock_client.cc ('k') | chromeos/dbus/system_clock_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « chromeos/dbus/fake_system_clock_client.cc ('k') | chromeos/dbus/system_clock_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698