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

Unified Diff: chrome/browser/chromeos/status/timezone_clock_updater.cc

Issue 8600001: Fixes bug where clock button wasn't updating in response to a timezone (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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
Index: chrome/browser/chromeos/status/timezone_clock_updater.cc
diff --git a/chrome/browser/chromeos/status/timezone_clock_updater.cc b/chrome/browser/chromeos/status/timezone_clock_updater.cc
new file mode 100644
index 0000000000000000000000000000000000000000..fe6c0c6d8f9623cab526cb46ba716818e6cd3dc2
--- /dev/null
+++ b/chrome/browser/chromeos/status/timezone_clock_updater.cc
@@ -0,0 +1,21 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/chromeos/status/timezone_clock_updater.h"
+
+#include "chrome/browser/chromeos/status/clock_menu_button.h"
+#include "chrome/browser/chromeos/system/timezone_settings.h"
+
+TimezoneClockUpdater::TimezoneClockUpdater(ClockMenuButton* button)
+ : button_(button) {
+ chromeos::system::TimezoneSettings::GetInstance()->AddObserver(this);
+}
+
+TimezoneClockUpdater::~TimezoneClockUpdater() {
+ chromeos::system::TimezoneSettings::GetInstance()->RemoveObserver(this);
+}
+
+void TimezoneClockUpdater::TimezoneChanged(const icu::TimeZone& timezone) {
+ button_->UpdateText();
+}

Powered by Google App Engine
This is Rietveld 408576698