Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2071)

Unified Diff: ash/system/tray/system_tray.cc

Issue 2921973002: Hide Night Light behind a flag (Closed)
Patch Set: James' comments Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/system/tiles/tray_tiles_unittest.cc ('k') | chrome/browser/about_flags.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/system_tray.cc
diff --git a/ash/system/tray/system_tray.cc b/ash/system/tray/system_tray.cc
index 75c9c119fb2586f0e4369cd45aea67628fd445ee..3b098244e737ab33ddb5d42fbac4bf52d6cf693c 100644
--- a/ash/system/tray/system_tray.cc
+++ b/ash/system/tray/system_tray.cc
@@ -265,8 +265,10 @@ void SystemTray::CreateItems(SystemTrayDelegate* delegate) {
AddTrayItem(base::WrapUnique(tray_scale_));
AddTrayItem(base::MakeUnique<TrayBrightness>(this));
AddTrayItem(base::MakeUnique<TrayCapsLock>(this));
- tray_night_light_ = new TrayNightLight(this);
- AddTrayItem(base::WrapUnique(tray_night_light_));
+ if (NightLightController::IsFeatureEnabled()) {
+ tray_night_light_ = new TrayNightLight(this);
+ AddTrayItem(base::WrapUnique(tray_night_light_));
+ }
// TODO(jamescook): Remove this when mash has support for display management
// and we have a DisplayManager equivalent. See http://crbug.com/548429
if (Shell::GetAshConfig() != Config::MASH)
« no previous file with comments | « ash/system/tiles/tray_tiles_unittest.cc ('k') | chrome/browser/about_flags.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698