Commit 8d4349cd authored by Maciek Slusarczyk's avatar Maciek Slusarczyk Committed by Commit Bot

Removal of DCHECK in ExistingUserController.

screen_refresh_timer_ in ExistingUserController triggers update of the
login screen when users are to be forced through the online flow. In the
normal conditions it should be re-started after firing for a particular
user. DCHECK that was previously introduced verifies that the timer is
not running on its restart.
This condition can be not met e.g. for managed devices. If device
settings got changed UpdateLoginDisplay is called which may trigger
timer restart. There are 3 possible solutions here: (a) remove DCHECK
and allow to restart the timer with re-calculated timeout, (b) let the
timer run unil it fires, or (c) add additional logic to check what
triggered UpdateLoginDisplay. Option (a) was selected as the simplest
one.

Bug: 871109
Change-Id: I7b5a4ddb0a9fc698bb45eb6974d502f37bc1be86
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2485260Reviewed-by: default avatarDenis Kuznetsov [CET] <antrim@chromium.org>
Commit-Queue: Maciek Slusarczyk <mslus@chromium.org>
Cr-Commit-Position: refs/heads/master@{#818979}
parent d04f46af
......@@ -640,8 +640,10 @@ bool ExistingUserController::ForceOnlineFlagChanged(
}
}
if (min_delta < base::TimeDelta::Max()) {
DCHECK(!screen_refresh_timer_->IsRunning());
// Schedule update task
// Schedule update task. If the timer was already running (which is possible
// when device settings get updated and we are re-running
// UpdateLoginDisplay) we will restart screen_refresh_timer_ with a new
// timeout value.
screen_refresh_timer_->Start(
FROM_HERE, min_delta,
base::BindOnce(&ExistingUserController::
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment