Commit 80dec72e authored by Sergey Poromov's avatar Sergey Poromov Committed by Commit Bot

Initiate DeviceSettingsService when D-Bus is available.

After recent change, DeviceSettingsService is created before
DBusThreadManager is initialized.
Because of that, DeviceOffHoursController never gets information
about system time synchronization and doesn't apply OffHours mode.

This change swaps DeviceSettingsService and DBusThreadManager creation.

Bug: 822227
Test: Trybots + manual test that OffHours are now applied.
Change-Id: I8a00cbbc53add056da4296123e9bfadd461eca94
Reviewed-on: https://chromium-review.googlesource.com/964522
Commit-Queue: Sergey Poromov <poromov@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543674}
parent 1dcd6759
...@@ -294,13 +294,13 @@ class DBusPreEarlyInit { ...@@ -294,13 +294,13 @@ class DBusPreEarlyInit {
DBusPreEarlyInit() { DBusPreEarlyInit() {
SystemSaltGetter::Initialize(); SystemSaltGetter::Initialize();
// Initialize DBusThreadManager for the browser.
DBusThreadManager::Initialize(DBusThreadManager::kAll);
// Initialize the device settings service so that we'll take actions per // Initialize the device settings service so that we'll take actions per
// signals sent from the session manager. This needs to happen before // signals sent from the session manager. This needs to happen before
// g_browser_process initializes BrowserPolicyConnector. // g_browser_process initializes BrowserPolicyConnector.
DeviceSettingsService::Initialize(); DeviceSettingsService::Initialize();
// Initialize DBusThreadManager for the browser.
DBusThreadManager::Initialize(DBusThreadManager::kAll);
} }
~DBusPreEarlyInit() { ~DBusPreEarlyInit() {
......
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