Chromium Code Reviews| 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 3b1a67e2d2f32351762f54dd938c2eb48ab06f5c..7b1b909f463dea929e97b67ed1bfceef3076c5a5 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,10 +13,6 @@ |
| #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) |
| @@ -23,9 +20,7 @@ TrayDate::TrayDate(SystemTray* system_tray) |
| time_tray_(NULL), |
| default_view_(NULL), |
| login_status_(LoginStatus::NOT_LOGGED_IN) { |
| -#if defined(OS_CHROMEOS) |
| system_clock_observer_.reset(new SystemClockObserver()); |
|
James Cook
2016/12/20 00:02:24
nit: move into constructor initializer list
Evan Stade
2016/12/20 18:25:21
Done.
|
| -#endif |
| 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_; |
| } |