Commit 1453a249 authored by Anatoliy Potapchuk's avatar Anatoliy Potapchuk Committed by Commit Bot

Fix chromium crash after setting up policy for device disable

In the condition when the device is disabled by policy it was referencing a yet
uninitialized LoginScreenClient leading to SYSSEGV and boot/login loop in
Chromebooks.

Bug: 884127
Change-Id: If99d945777e56cbc1299f5094afd32cee1872f3a
Reviewed-on: https://chromium-review.googlesource.com/c/1435436
Commit-Queue: Anatoliy Potapchuk <apotapchuk@chromium.org>
Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#626120}
parent a4ac6cec
...@@ -930,7 +930,6 @@ void ChromeBrowserMainPartsChromeos::PostProfileInit() { ...@@ -930,7 +930,6 @@ void ChromeBrowserMainPartsChromeos::PostProfileInit() {
g_browser_process->local_state()); g_browser_process->local_state());
g_browser_process->platform_part()->InitializeAutomaticRebootManager(); g_browser_process->platform_part()->InitializeAutomaticRebootManager();
g_browser_process->platform_part()->InitializeDeviceDisablingManager();
user_removal_manager::RemoveUsersIfNeeded(); user_removal_manager::RemoveUsersIfNeeded();
// This observer cannot be created earlier because it requires the shell to be // This observer cannot be created earlier because it requires the shell to be
......
...@@ -214,6 +214,7 @@ void ScreenLocker::Init() { ...@@ -214,6 +214,7 @@ void ScreenLocker::Init() {
delegate_ = views_screen_locker_.get(); delegate_ = views_screen_locker_.get();
// Create and display lock screen. // Create and display lock screen.
CHECK(LoginScreenClient::HasInstance());
LoginScreenClient::Get()->login_screen()->ShowLockScreen(base::BindOnce( LoginScreenClient::Get()->login_screen()->ShowLockScreen(base::BindOnce(
[](ViewsScreenLocker* screen_locker, bool did_show) { [](ViewsScreenLocker* screen_locker, bool did_show) {
CHECK(did_show); CHECK(did_show);
......
...@@ -271,6 +271,9 @@ void ChromeBrowserMainExtraPartsAsh::PostProfileInit() { ...@@ -271,6 +271,9 @@ void ChromeBrowserMainExtraPartsAsh::PostProfileInit() {
cast_config_client_media_router_ = cast_config_client_media_router_ =
std::make_unique<CastConfigClientMediaRouter>(); std::make_unique<CastConfigClientMediaRouter>();
login_screen_client_ = std::make_unique<LoginScreenClient>(); login_screen_client_ = std::make_unique<LoginScreenClient>();
// https://crbug.com/884127 ensuring that LoginScreenClient is initialized before using it InitializeDeviceDisablingManager.
g_browser_process->platform_part()->InitializeDeviceDisablingManager();
media_client_ = std::make_unique<MediaClient>(); media_client_ = std::make_unique<MediaClient>();
// Instantiate DisplaySettingsHandler after CrosSettings has been // Instantiate DisplaySettingsHandler after CrosSettings has been
......
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