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

Unified Diff: chromeos/dbus/power_policy_controller.cc

Issue 807093003: chromeos: Add pref for automated brightness increases. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | « chromeos/dbus/power_policy_controller.h ('k') | chromeos/dbus/power_policy_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/power_policy_controller.cc
diff --git a/chromeos/dbus/power_policy_controller.cc b/chromeos/dbus/power_policy_controller.cc
index 970ff117925214f962548f5fee6c25c20494c59f..40621c840423fbfeaf112ceb0c0a1e77c1f98e14 100644
--- a/chromeos/dbus/power_policy_controller.cc
+++ b/chromeos/dbus/power_policy_controller.cc
@@ -88,7 +88,8 @@ PowerPolicyController::PrefValues::PrefValues()
enable_auto_screen_lock(false),
presentation_screen_dim_delay_factor(1.0),
user_activity_screen_dim_delay_factor(1.0),
- wait_for_initial_user_activity(false) {}
+ wait_for_initial_user_activity(false),
+ force_nonzero_brightness_for_user_activity(true) {}
// static
std::string PowerPolicyController::GetPolicyDebugString(
@@ -128,6 +129,10 @@ std::string PowerPolicyController::GetPolicyDebugString(
str += base::StringPrintf("wait_for_initial_user_activity=%d ",
policy.wait_for_initial_user_activity());
}
+ if (policy.has_force_nonzero_brightness_for_user_activity()) {
+ str += base::StringPrintf("force_nonzero_brightness_for_user_activity=%d ",
+ policy.force_nonzero_brightness_for_user_activity());
+ }
if (policy.has_reason())
str += base::StringPrintf("reason=\"%s\" ", policy.reason().c_str());
base::TrimWhitespace(str, base::TRIM_TRAILING, &str);
@@ -210,6 +215,8 @@ void PowerPolicyController::ApplyPrefs(const PrefValues& values) {
values.user_activity_screen_dim_delay_factor);
prefs_policy_.set_wait_for_initial_user_activity(
values.wait_for_initial_user_activity);
+ prefs_policy_.set_force_nonzero_brightness_for_user_activity(
+ values.force_nonzero_brightness_for_user_activity);
honor_screen_wake_locks_ = values.allow_screen_wake_locks;
« no previous file with comments | « chromeos/dbus/power_policy_controller.h ('k') | chromeos/dbus/power_policy_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698