Index: ash/shell.cc |
diff --git a/ash/shell.cc b/ash/shell.cc |
index 1c72b473fa635c9caca4677b29d17a70ea5cb317..38dcd6023ef7e10b1525a6514aa435825ccb8835 100644 |
--- a/ash/shell.cc |
+++ b/ash/shell.cc |
@@ -73,7 +73,6 @@ |
#include "ash/system/locale/locale_notification_controller.h" |
#include "ash/system/network/sms_observer.h" |
#include "ash/system/network/vpn_list.h" |
-#include "ash/system/night_light/night_light_controller.h" |
#include "ash/system/power/power_event_observer.h" |
#include "ash/system/power/power_status.h" |
#include "ash/system/power/video_activity_notifier.h" |
@@ -561,8 +560,6 @@ Shell::Shell(std::unique_ptr<ShellDelegate> shell_delegate, |
media_controller_(base::MakeUnique<MediaController>()), |
new_window_controller_(base::MakeUnique<NewWindowController>()), |
session_controller_(base::MakeUnique<SessionController>()), |
- night_light_controller_( |
- base::MakeUnique<NightLightController>(session_controller_.get())), |
shelf_controller_(base::MakeUnique<ShelfController>()), |
shell_delegate_(std::move(shell_delegate)), |
shutdown_controller_(base::MakeUnique<ShutdownController>()), |
@@ -790,6 +787,11 @@ Shell::~Shell() { |
void Shell::Init(const ShellInitParams& init_params) { |
const Config config = shell_port_->GetAshConfig(); |
+ if (NightLightController::IsFeatureEnabled()) { |
+ night_light_controller_ = |
+ base::MakeUnique<NightLightController>(session_controller_.get()); |
+ } |
+ |
blocking_pool_ = init_params.blocking_pool; |
wallpaper_delegate_ = shell_delegate_->CreateWallpaperDelegate(); |