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

Unified Diff: ash/system/chromeos/power/power_event_observer.cc

Issue 2446453002: Refactor ShouldLockScreenBeforeSuspending to ShouldLockScreenAutomatically (Closed)
Patch Set: comment Created 4 years, 2 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/shell/shell_delegate_impl.cc ('k') | ash/system/chromeos/power/power_event_observer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/chromeos/power/power_event_observer.cc
diff --git a/ash/system/chromeos/power/power_event_observer.cc b/ash/system/chromeos/power/power_event_observer.cc
index 663a8a613876b67e12d9c7bb4aae4bf5a22c3336..897b1e2feeae034576a48e4f91b7ce9c5146c14b 100644
--- a/ash/system/chromeos/power/power_event_observer.cc
+++ b/ash/system/chromeos/power/power_event_observer.cc
@@ -80,9 +80,9 @@ void PowerEventObserver::SuspendImminent() {
// This class is responsible for disabling all rendering requests at suspend
// time and then enabling them at resume time. When the
- // lock-before-suspending pref is not set this is easy to do since
+ // auto-screen-lock pref is not set this is easy to do since
// StopRenderingRequests() is just called directly from this function. If the
- // lock-before-suspending pref _is_ set, then the suspend needs to be delayed
+ // auto-screen-lock pref _is_ set, then the suspend needs to be delayed
// until the lock screen is fully visible. While it is sufficient from a
// security perspective to block only until the lock screen is ready, which
// guarantees that the contents of the user's screen are no longer visible,
@@ -91,7 +91,7 @@ void PowerEventObserver::SuspendImminent() {
// process starts rendering again. To deal with this, the suspend is delayed
// until all the lock screen animations have completed and the suspend request
// is unblocked from OnLockAnimationsComplete().
- if (!screen_locked_ && delegate->ShouldLockScreenBeforeSuspending() &&
+ if (!screen_locked_ && delegate->ShouldLockScreenAutomatically() &&
delegate->CanLockScreen()) {
screen_lock_callback_ = chromeos::DBusThreadManager::Get()
->GetPowerManagerClient()
« no previous file with comments | « ash/shell/shell_delegate_impl.cc ('k') | ash/system/chromeos/power/power_event_observer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698