| Index: ash/system/status_area_widget.cc
|
| diff --git a/ash/system/status_area_widget.cc b/ash/system/status_area_widget.cc
|
| index b487de50350d378e9737f2f4da853a6cb1e5c7b3..c1b165f6f4d75c532aeb4b8fb6a2dd558591efe6 100644
|
| --- a/ash/system/status_area_widget.cc
|
| +++ b/ash/system/status_area_widget.cc
|
| @@ -46,13 +46,14 @@ StatusAreaWidget::~StatusAreaWidget() {
|
| void StatusAreaWidget::CreateTrayViews() {
|
| AddSystemTray();
|
| AddWebNotificationTray();
|
| - // Initialize() must be called after all trays have been created.
|
| + SystemTrayDelegate* delegate = ash::Shell::GetInstance()->tray_delegate();
|
| + DCHECK(delegate);
|
| + // Initialize after all trays have been created.
|
| if (system_tray_)
|
| - system_tray_->Initialize();
|
| + system_tray_->InitializeTrayItems(delegate);
|
| if (web_notification_tray_)
|
| web_notification_tray_->Initialize();
|
| - UpdateAfterLoginStatusChange(
|
| - ash::Shell::GetInstance()->tray_delegate()->GetUserLoginStatus());
|
| + UpdateAfterLoginStatusChange(delegate->GetUserLoginStatus());
|
| }
|
|
|
| void StatusAreaWidget::Shutdown() {
|
|
|