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

Issue 2830853002: Break circular dependency between InitializeDeviceDisablingManager and DeviceDisabledScreen

Created:
3 years, 8 months ago by Jay Lee
Modified:
2 years, 1 month ago
Reviewers:
CC:
chromium-reviews
Target Ref:
refs/branch-heads/3071
Project:
chromium
Visibility:
Public.

Description

Break circular dependency between InitializeDeviceDisablingManager and DeviceDisabledScreen crrev.com/2714493002 uncovered a circular dependency between BrowserProcessPlatformPart::InitializeDeviceDisablingManager and DeviceDisabledScreen::DeviceDisabledScreen. Previously there was a part in the call stack that forked off into an asynchronous call, DeviceDisablingManager::UpdateFromCrosSettings, which would queue up a callback in case the CrosSettings wasn't ready yet (and it wasn't). The referenced CL fixed a bug by immediately loading the settings, but it unfortunately broke the assumption here. The suggested fix breaks the dependency by moving Init() outside of the constructor (so the object exists at the time further code called from Init() tries to access it). This bug was causing a crash for disabled devices (ui wouldn't start). The circle starts on the "device_disabling_manager_.reset" line. TEST=manual BUG=709518 Review-Url: https://codereview.chromium.org/2815893002 Cr-Commit-Position: refs/heads/master@{#464708} (cherry picked from commit 87c761f625a57653cc241f5691cb013ad9ca3efa)

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -6 lines) Patch
M chrome/browser/browser_process_platform_part_chromeos.cc View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/chromeos/login/screens/device_disabled_screen.cc View 1 chunk +1 line, -3 lines 0 comments Download
M chrome/browser/chromeos/system/device_disabling_manager.h View 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/system/device_disabling_manager.cc View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/chromeos/system/device_disabling_manager_unittest.cc View 1 chunk +1 line, -0 lines 0 comments Download

Powered by Google App Engine
This is Rietveld 408576698