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

Issue 25690003: Refactored the DeviceManagementService to get its parameters from a delegate. (Closed)

Created:
7 years, 2 months ago by Joao da Silva
Modified:
7 years, 2 months ago
Reviewers:
stevenjb, pastarmovj
CC:
chromium-reviews, stevenjb
Visibility:
Public.

Description

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 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=226499

Patch Set 1 #

Total comments: 6

Patch Set 2 : addressed comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+160 lines, -100 lines) Patch
M chrome/browser/policy/browser_policy_connector.cc View 2 chunks +55 lines, -47 lines 0 comments Download
M chrome/browser/policy/cloud/device_management_service.h View 2 chunks +27 lines, -17 lines 0 comments Download
M chrome/browser/policy/cloud/device_management_service.cc View 1 3 chunks +13 lines, -14 lines 0 comments Download
M chrome/browser/policy/cloud/device_management_service_browsertest.cc View 2 chunks +4 lines, -5 lines 0 comments Download
M chrome/browser/policy/cloud/device_management_service_unittest.cc View 3 chunks +5 lines, -8 lines 0 comments Download
M chrome/browser/policy/cloud/mock_device_management_service.h View 1 chunk +19 lines, -0 lines 0 comments Download
M chrome/browser/policy/cloud/mock_device_management_service.cc View 1 2 chunks +35 lines, -7 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Joao da Silva
Julian: please review Steven: FYI. This simplifies your fix in https://codereview.chromium.org/25112004 without breaking the policy ...
7 years, 2 months ago (2013-10-02 10:00:30 UTC) #1
pastarmovj
LGTM with a couple of small nits. https://codereview.chromium.org/25690003/diff/1/chrome/browser/policy/cloud/device_management_service.cc File chrome/browser/policy/cloud/device_management_service.cc (right): https://codereview.chromium.org/25690003/diff/1/chrome/browser/policy/cloud/device_management_service.cc#newcode534 chrome/browser/policy/cloud/device_management_service.cc:534: weak_ptr_factory_(this) {} ...
7 years, 2 months ago (2013-10-02 11:14:10 UTC) #2
Joao da Silva
Thanks for the review! https://codereview.chromium.org/25690003/diff/1/chrome/browser/policy/cloud/device_management_service.cc File chrome/browser/policy/cloud/device_management_service.cc (right): https://codereview.chromium.org/25690003/diff/1/chrome/browser/policy/cloud/device_management_service.cc#newcode534 chrome/browser/policy/cloud/device_management_service.cc:534: weak_ptr_factory_(this) {} On 2013/10/02 11:14:10, ...
7 years, 2 months ago (2013-10-02 11:37:40 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joaodasilva@chromium.org/25690003/11001
7 years, 2 months ago (2013-10-02 11:37:53 UTC) #4
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=204553
7 years, 2 months ago (2013-10-02 13:31:57 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joaodasilva@chromium.org/25690003/11001
7 years, 2 months ago (2013-10-02 13:33:30 UTC) #6
commit-bot: I haz the power
Change committed as 226499
7 years, 2 months ago (2013-10-02 18:05:02 UTC) #7
stevenjb
7 years, 2 months ago (2013-10-02 18:20:11 UTC) #8
Message was sent while issue was closed.
This is definitely better, thanks.

Powered by Google App Engine
This is Rietveld 408576698