| Index: ash/common/system/date/tray_date.cc
|
| diff --git a/ash/common/system/date/tray_date.cc b/ash/common/system/date/tray_date.cc
|
| index 48d0cd1d23138f3a49291127bda58d95aca1c64e..2ba6d6d2a4f79ef8e9674a8d542e05f63949ea00 100644
|
| --- a/ash/common/system/date/tray_date.cc
|
| +++ b/ash/common/system/date/tray_date.cc
|
| @@ -5,6 +5,7 @@
|
| #include "ash/common/system/date/tray_date.h"
|
|
|
| #include "ash/common/shelf/wm_shelf_util.h"
|
| +#include "ash/common/system/chromeos/system_clock_observer.h"
|
| #include "ash/common/system/date/date_default_view.h"
|
| #include "ash/common/system/date/date_view.h"
|
| #include "ash/common/system/tray/system_tray.h"
|
| @@ -12,20 +13,14 @@
|
| #include "ash/common/system/tray/tray_item_view.h"
|
| #include "ash/common/wm_shell.h"
|
|
|
| -#if defined(OS_CHROMEOS)
|
| -#include "ash/common/system/chromeos/system_clock_observer.h"
|
| -#endif
|
| -
|
| namespace ash {
|
|
|
| TrayDate::TrayDate(SystemTray* system_tray)
|
| : SystemTrayItem(system_tray, UMA_DATE),
|
| time_tray_(NULL),
|
| default_view_(NULL),
|
| - login_status_(LoginStatus::NOT_LOGGED_IN) {
|
| -#if defined(OS_CHROMEOS)
|
| - system_clock_observer_.reset(new SystemClockObserver());
|
| -#endif
|
| + login_status_(LoginStatus::NOT_LOGGED_IN),
|
| + system_clock_observer_(new SystemClockObserver()) {
|
| WmShell::Get()->system_tray_notifier()->AddClockObserver(this);
|
| }
|
|
|
| @@ -66,12 +61,10 @@ views::View* TrayDate::CreateTrayView(LoginStatus status) {
|
| views::View* TrayDate::CreateDefaultView(LoginStatus status) {
|
| default_view_ = new DateDefaultView(this, status);
|
|
|
| -#if defined(OS_CHROMEOS)
|
| // Save the login status we created the view with.
|
| login_status_ = status;
|
|
|
| OnSystemClockCanSetTimeChanged(system_clock_observer_->can_set_time());
|
| -#endif
|
| return default_view_;
|
| }
|
|
|
|
|