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

Unified Diff: ash/system/night_light/night_light_controller.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
Index: ash/system/night_light/night_light_controller.cc
diff --git a/ash/system/night_light/night_light_controller.cc b/ash/system/night_light/night_light_controller.cc
index 90e3179f6d5a571c3caa709199c3be3db226fd29..cdbc238ad74baae8d1e5cd152f2ad9e1df656668 100644
--- a/ash/system/night_light/night_light_controller.cc
+++ b/ash/system/night_light/night_light_controller.cc
@@ -4,9 +4,11 @@
#include "ash/system/night_light/night_light_controller.h"
+#include "ash/ash_switches.h"
#include "ash/public/cpp/ash_pref_names.h"
#include "ash/session/session_controller.h"
#include "ash/shell.h"
+#include "base/command_line.h"
#include "base/time/time.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/pref_service.h"
@@ -56,6 +58,12 @@ NightLightController::~NightLightController() {
session_controller_->RemoveObserver(this);
}
+// static
+bool NightLightController::IsFeatureEnabled() {
+ return base::CommandLine::ForCurrentProcess()->HasSwitch(
+ ash::switches::kAshEnableNightLight);
+}
+
// static
void NightLightController::RegisterPrefs(PrefRegistrySimple* registry) {
registry->RegisterBooleanPref(prefs::kNightLightEnabled, false);
« no previous file with comments | « ash/system/night_light/night_light_controller.h ('k') | ash/system/night_light/night_light_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698