| Index: ash/shell.cc
|
| diff --git a/ash/shell.cc b/ash/shell.cc
|
| index b46ad3fa838445465eced9b8b6ff84539c0ee001..2b6a8c9998837261d66b1acea76f61252ed4a3d1 100644
|
| --- a/ash/shell.cc
|
| +++ b/ash/shell.cc
|
| @@ -49,6 +49,7 @@
|
| #include "ash/shell_factory.h"
|
| #include "ash/shell_window_ids.h"
|
| #include "ash/system/locale/locale_notification_controller.h"
|
| +#include "ash/system/session/logout_confirmation_controller.h"
|
| #include "ash/system/status_area_widget.h"
|
| #include "ash/system/tray/system_tray_delegate.h"
|
| #include "ash/system/tray/system_tray_notifier.h"
|
| @@ -80,6 +81,7 @@
|
| #include "ash/wm/window_util.h"
|
| #include "ash/wm/workspace_controller.h"
|
| #include "base/bind.h"
|
| +#include "base/bind_helpers.h"
|
| #include "base/command_line.h"
|
| #include "base/debug/trace_event.h"
|
| #include "ui/aura/client/aura_constants.h"
|
| @@ -666,6 +668,9 @@ Shell::~Shell() {
|
| // TODO(xiyuan): Move it back when app list container is no longer needed.
|
| app_list_controller_.reset();
|
|
|
| + // Destroy the LogoutConfirmationController before the SystemTrayDelegate.
|
| + logout_confirmation_controller_.reset();
|
| +
|
| // Destroy SystemTrayDelegate before destroying the status area(s).
|
| system_tray_delegate_->Shutdown();
|
| system_tray_delegate_.reset();
|
| @@ -969,6 +974,12 @@ void Shell::Init() {
|
| // Initialize system_tray_delegate_ after StatusAreaWidget is created.
|
| system_tray_delegate_->Initialize();
|
|
|
| + // Create the LogoutConfirmationController after the SystemTrayDelegate.
|
| + logout_confirmation_controller_.reset(
|
| + new internal::LogoutConfirmationController(
|
| + base::Bind(&SystemTrayDelegate::SignOut,
|
| + base::Unretained(system_tray_delegate_.get()))));
|
| +
|
| // TODO(oshima): Initialize all RootWindowControllers once, and
|
| // initialize controller/delegates above when initializing the
|
| // primary root window controller.
|
|
|