Refactored the DeviceManagementService to get its parameters from a delegate.
The DeviceManagementService will be moved along with the policy/ code into a new component, and thus it can't access //chrome nor //chromeos code. A recent refactoring in that direction introduced a regression because it called StatisticsProvider::GetMachineStatistic() before the StatisticsProvider was initialized. This used to work before because GetMachineStatistic() was called only once the first request was sent to the server (which, on enrolled devices, happens in a task that is immediately posted but the StatisticsProvider is already initialized by then). This change introduces a delegate that the DeviceManagementService uses to get its configuration parameters, so that the call to GetMachineStatistic() can again be performed only when a request is sent. BUG=271392,302798 Review URL: https://codereview.chromium.org/25690003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226499 0039d316-1c4b-4281-b951-d872f2087c98
Showing
Please register or sign in to comment