diff options
author | michaelpg@chromium.org <michaelpg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-28 05:47:00 +0000 |
---|---|---|
committer | michaelpg@chromium.org <michaelpg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-28 05:47:00 +0000 |
commit | dd0bf461376beee097367a82c78ab70abc41744e (patch) | |
tree | 70e576cff99599a320c6d087c950a67bc6858d25 /chromeos/dbus/system_clock_client.h | |
parent | 3e9fc2f543b884e8cd35417605abf1075205e8e8 (diff) | |
download | chromium_src-dd0bf461376beee097367a82c78ab70abc41744e.zip chromium_src-dd0bf461376beee097367a82c78ab70abc41744e.tar.gz chromium_src-dd0bf461376beee097367a82c78ab70abc41744e.tar.bz2 |
Date and Time dialog for when the clock isn't synced.
If the time has not been set automatically via network syncing, the system
clock can be changed. This dialog allows the user to change the date, time
and time zone when possible. The motivation is to unbrick devices with
the wrong time that need to be rolled out into time-sensitive networks.
Documentation of the changes to Chrome OS and Ash for this CL is here:
https://docs.google.com/a/google.com/drawings/d/1T3demthtROnXf1iE31p5aIPcQzK9SmjfE9EjnJbZ4zs
System Time Manual Update UI design doc:
https://docs.google.com/a/google.com/document/d/1djzhBrtbx-52Gctp3Fd5MIosARbTwQh_lMmd_qUnqgo
Screenshot with timezone:
https://drive.google.com/a/google.com/file/d/0B6HSBrih6pNUd3p2SFBoVktjVzQ
Screenshot from settings page, no timezone:
https://drive.google.com/a/google.com/file/d/0B6HSBrih6pNUXzk0TjNiT0tKMTQ
BUG=232066
TEST=SetTimeWebUITest, DateTimeOptionsWebUITest
R=stevenjb@chromium.org,nkostylev@chromium.org,dbeam@chromium.org,derat@chromium.org,asvitkine@chromium.org
TBR=sky@chromium.org
# TBR for adding resources to chrome/browser/chrome_resources.grd
Please review:
stevenjb@chromium.org
- ash/system
- chromeos/dbus
derat@chromium.org:
- chrome/browser/chromeos
- chrome/browser/ui/ash
- chromeos/dbus (optional)
nkostylev@chromium.org:
- chrome/app
- chrome/browser/chromeos
- chrome/browser/resources/chromeos
- chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
- chrome/browser/ui/webui/chromeos
- chrome/browser/ui/webui/options/chromeos
- chrome/browser/browser_resources.grd
- chrome/chrome_*.gypi
- chrome/common
dbeam@chromium.org:
- chrome/browser/resources/options
- chrome/browser/ui/webui/options/*.cc
sky@chromium.org:
- chrome/browser/browser_resources.grd
Review URL: https://codereview.chromium.org/247663003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266431 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos/dbus/system_clock_client.h')
-rw-r--r-- | chromeos/dbus/system_clock_client.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/chromeos/dbus/system_clock_client.h b/chromeos/dbus/system_clock_client.h index 849612d..1757853 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(); |