| Index: ash/mus/window_manager.cc
|
| diff --git a/ash/mus/window_manager.cc b/ash/mus/window_manager.cc
|
| index 569c4691535bb68d2f781da5c5c525e3894063bc..bd3a4316057e455ea8e3ce282de08f5de735ecb2 100644
|
| --- a/ash/mus/window_manager.cc
|
| +++ b/ash/mus/window_manager.cc
|
| @@ -8,6 +8,7 @@
|
|
|
| #include <utility>
|
|
|
| +#include "ash/common/session/session_controller.h"
|
| #include "ash/common/wm/container_finder.h"
|
| #include "ash/common/wm/window_state.h"
|
| #include "ash/display/screen_position_controller.h"
|
| @@ -139,9 +140,6 @@ void WindowManager::Init(
|
| this, pointer_watcher_event_router_.get()));
|
| shell_->Initialize(blocking_pool);
|
| lookup_.reset(new WmLookupMus);
|
| -
|
| - // TODO: this should be called when logged in. See http://crbug.com/654606.
|
| - shell_->CreateShelf();
|
| }
|
|
|
| aura::client::ActivationClient* WindowManager::activation_client() {
|
| @@ -228,9 +226,9 @@ RootWindowController* WindowManager::CreateRootWindowController(
|
| root_window_controller_ptr.get();
|
| root_window_controllers_.insert(std::move(root_window_controller_ptr));
|
|
|
| - // TODO: this should be called when logged in. See http://crbug.com/654606.
|
| - root_window_controller->ash_root_window_controller()
|
| - ->CreateShelf();
|
| + // Create a shelf if a user is already logged in.
|
| + if (shell_->session_controller()->NumberOfLoggedInUsers())
|
| + root_window_controller->ash_root_window_controller()->CreateShelf();
|
|
|
| for (auto& observer : observers_)
|
| observer.OnRootWindowControllerAdded(root_window_controller);
|
|
|