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

Unified Diff: ash/system/chromeos/system_clock_observer.cc

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 | « ash/system/chromeos/system_clock_observer.h ('k') | ash/system/date/clock_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/chromeos/system_clock_observer.cc
diff --git a/ash/system/chromeos/system_clock_observer.cc b/ash/system/chromeos/system_clock_observer.cc
index d154d5eda2e6101b9603473ac5c77193aae5f0b7..5ed6330d7d6b0cb30fe5da2abc48ddeb1259f1ca 100644
--- a/ash/system/chromeos/system_clock_observer.cc
+++ b/ash/system/chromeos/system_clock_observer.cc
@@ -14,6 +14,8 @@ SystemClockObserver::SystemClockObserver() {
chromeos::DBusThreadManager::Get()->GetSystemClockClient()
->AddObserver(this);
chromeos::system::TimezoneSettings::GetInstance()->AddObserver(this);
+ can_set_time_ =
+ chromeos::DBusThreadManager::Get()->GetSystemClockClient()->CanSetTime();
}
SystemClockObserver::~SystemClockObserver() {
@@ -23,8 +25,13 @@ SystemClockObserver::~SystemClockObserver() {
}
void SystemClockObserver::SystemClockUpdated() {
+ Shell::GetInstance()->system_tray_notifier()->NotifySystemClockTimeUpdated();
+}
+
+void SystemClockObserver::SystemClockCanSetTimeChanged(bool can_set_time) {
+ can_set_time_ = can_set_time;
Shell::GetInstance()->system_tray_notifier()
- ->NotifySystemClockTimeUpdated();
+ ->NotifySystemClockCanSetTimeChanged(can_set_time_);
}
void SystemClockObserver::TimezoneChanged(const icu::TimeZone& timezone) {
« no previous file with comments | « ash/system/chromeos/system_clock_observer.h ('k') | ash/system/date/clock_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698