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}
5 files changed