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

Issue 2371213002: Refactor: Inject StatisticsProvider as a dependency of DeviceCloudPolicyInitializer. (Closed)

Created:
4 years, 2 months ago by Thiemo Nagel
Modified:
4 years, 2 months ago
CC:
chromium-reviews, asvitkine+watch_chromium.org, alemate+watch_chromium.org, achuith+watch_chromium.org, oshima+watch_chromium.org, davemoore+watch_chromium.org, The one and only Dr. Crash
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor: Inject StatisticsProvider as a dependency of DeviceCloudPolicyInitializer. Also move GetMachineID() from DeviceCloudPolicyManager() to StatisticsProvider which seems to be a more natural home for it. Also exit enrollment early when serial is missing from VPD. BUG=none Committed: https://crrev.com/9a445b35c5fd83eb837ba87f99e67b0dd1611903 Cr-Commit-Position: refs/heads/master@{#422153}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Improve string. #

Patch Set 3 : Remove artefact of manual testing. #

Total comments: 1

Patch Set 4 : Rebase. #

Patch Set 5 : Inject StatisticsProvider as a dependency of DeviceCloudPolicyInitializer. #

Total comments: 14

Patch Set 6 : Rename GetMachineID() --> GetEnterpriseMachineID() and add TODO to revert the rename. #

Patch Set 7 : Rebase. #

Total comments: 2

Patch Set 8 : Address Maksim's comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+148 lines, -110 lines) Patch
M chrome/app/chromeos_strings.grdp View 1 2 3 4 5 6 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/chromeos/login/enrollment/auto_enrollment_controller.cc View 1 2 3 4 5 6 7 2 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper_impl.cc View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/login/version_info_updater.cc View 1 2 3 4 5 6 7 2 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/chromeos/login/wizard_controller_browsertest.cc View 1 2 3 4 5 6 1 chunk +4 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/policy/browser_policy_connector_chromeos.cc View 1 2 3 4 5 6 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/policy/device_cloud_policy_initializer.h View 1 2 3 4 5 6 4 chunks +10 lines, -1 line 0 comments Download
M chrome/browser/chromeos/policy/device_cloud_policy_initializer.cc View 1 2 3 4 5 6 6 chunks +17 lines, -20 lines 0 comments Download
M chrome/browser/chromeos/policy/device_cloud_policy_initializer_unittest.cc View 1 2 3 4 5 6 1 chunk +6 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h View 1 2 3 4 5 6 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.cc View 1 2 3 4 5 6 2 chunks +0 lines, -48 lines 0 comments Download
M chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos_unittest.cc View 1 2 3 4 5 6 2 chunks +7 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/policy/enrollment_handler_chromeos.cc View 1 2 3 4 5 6 1 chunk +14 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/policy/enrollment_status_chromeos.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/chromeos/policy/fake_device_cloud_policy_initializer.cc View 1 2 3 4 1 chunk +10 lines, -9 lines 0 comments Download
M chrome/browser/ui/webui/chromeos/login/enrollment_screen_handler.cc View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M chromeos/system/statistics_provider.h View 1 2 3 4 5 6 7 2 chunks +13 lines, -3 lines 0 comments Download
M chromeos/system/statistics_provider.cc View 1 2 3 4 5 6 7 3 chunks +29 lines, -2 lines 0 comments Download
M components/policy/core/common/cloud/cloud_policy_client.h View 1 2 3 2 chunks +6 lines, -1 line 0 comments Download
M components/policy/core/common/cloud/enterprise_metrics.h View 1 chunk +2 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 47 (23 generated)
Thiemo Nagel
drcrash fyi: Changes to MetricEnrollment require a corresponding change in histograms.xml. https://codereview.chromium.org/2371213002/diff/20001/components/policy/core/common/cloud/cloud_policy_client.h File components/policy/core/common/cloud/cloud_policy_client.h (right): ...
4 years, 2 months ago (2016-09-27 16:09:06 UTC) #4
Thiemo Nagel
Hi Achuith, could you please take a look at the UI parts? Thank you! Thiemo
4 years, 2 months ago (2016-09-27 16:10:51 UTC) #6
Thiemo Nagel
Hi Ilya, could you please take a look at histograms.xml? Thank you! Thiemo
4 years, 2 months ago (2016-09-27 16:12:24 UTC) #8
Ilya Sherman
histograms.xml LGTM
4 years, 2 months ago (2016-09-27 21:17:18 UTC) #9
achuithb
Didn't look at policy parts, but UI parts lgtm
4 years, 2 months ago (2016-09-28 21:04:53 UTC) #10
Thiemo Nagel
Hi Mattias, since I had discussed this CL with you over chat: Would it be ...
4 years, 2 months ago (2016-09-29 08:48:01 UTC) #12
Mattias Nissler (ping if slow)
Looks reasonable to me, feel free to submit. If you're willing to spend one extra ...
4 years, 2 months ago (2016-09-29 09:12:26 UTC) #13
Thiemo Nagel
On 2016/09/29 09:12:26, Mattias Nissler (ping if slow) wrote: > Looks reasonable to me, feel ...
4 years, 2 months ago (2016-09-29 12:59:43 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2371213002/60001
4 years, 2 months ago (2016-09-29 12:59:56 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/243899)
4 years, 2 months ago (2016-09-29 13:49:06 UTC) #19
Thiemo Nagel
Wow, that escalated quickly. Getting unittests right required quite some refactoring. I'll carry forward the ...
4 years, 2 months ago (2016-09-30 11:54:04 UTC) #23
Thiemo Nagel
Mattias, would you be interested/willing to continue with the review or -- given that you're ...
4 years, 2 months ago (2016-09-30 11:56:30 UTC) #24
Mattias Nissler (ping if slow)
Just a high-level comment, I haven't looked closely. I'm happy to continue skimming this, but ...
4 years, 2 months ago (2016-09-30 12:01:55 UTC) #25
Thiemo Nagel
On 2016/09/30 12:01:55, Mattias Nissler (ping if slow) wrote: > Just a high-level comment, I ...
4 years, 2 months ago (2016-09-30 13:03:00 UTC) #26
Thiemo Nagel
Maksim, may I kindly ask you to take a look? Thanks, Thiemo
4 years, 2 months ago (2016-09-30 13:04:45 UTC) #28
Mattias Nissler (ping if slow)
https://codereview.chromium.org/2371213002/diff/120001/chromeos/system/statistics_provider.cc File chromeos/system/statistics_provider.cc (right): https://codereview.chromium.org/2371213002/diff/120001/chromeos/system/statistics_provider.cc#newcode98 chromeos/system/statistics_provider.cc:98: "Product_S/N", // Lumpy/Alex devices On 2016/09/30 13:03:00, Thiemo Nagel ...
4 years, 2 months ago (2016-09-30 13:16:44 UTC) #29
Thiemo Nagel
https://codereview.chromium.org/2371213002/diff/120001/chromeos/system/statistics_provider.cc File chromeos/system/statistics_provider.cc (right): https://codereview.chromium.org/2371213002/diff/120001/chromeos/system/statistics_provider.cc#newcode98 chromeos/system/statistics_provider.cc:98: "Product_S/N", // Lumpy/Alex devices It looks like I'm missing ...
4 years, 2 months ago (2016-09-30 13:22:10 UTC) #30
Mattias Nissler (ping if slow)
https://codereview.chromium.org/2371213002/diff/120001/chromeos/system/statistics_provider.cc File chromeos/system/statistics_provider.cc (right): https://codereview.chromium.org/2371213002/diff/120001/chromeos/system/statistics_provider.cc#newcode98 chromeos/system/statistics_provider.cc:98: "Product_S/N", // Lumpy/Alex devices On 2016/09/30 13:22:10, Thiemo Nagel ...
4 years, 2 months ago (2016-09-30 13:30:25 UTC) #31
Thiemo Nagel
https://codereview.chromium.org/2371213002/diff/120001/chromeos/system/statistics_provider.cc File chromeos/system/statistics_provider.cc (right): https://codereview.chromium.org/2371213002/diff/120001/chromeos/system/statistics_provider.cc#newcode98 chromeos/system/statistics_provider.cc:98: "Product_S/N", // Lumpy/Alex devices Thanks a lot. I had ...
4 years, 2 months ago (2016-09-30 16:13:11 UTC) #34
emaxx
lgtm with nits https://codereview.chromium.org/2371213002/diff/120001/chrome/browser/chromeos/login/enrollment/auto_enrollment_controller.cc File chrome/browser/chromeos/login/enrollment/auto_enrollment_controller.cc (right): https://codereview.chromium.org/2371213002/diff/120001/chrome/browser/chromeos/login/enrollment/auto_enrollment_controller.cc#newcode62 chrome/browser/chromeos/login/enrollment/auto_enrollment_controller.cc:62: chromeos::system::StatisticsProvider* provider = nit: "chromeos::" is ...
4 years, 2 months ago (2016-09-30 16:18:00 UTC) #35
Thiemo Nagel
Addressed nits and carried over one comment from https://codereview.chromium.org/2343163002/ to make that CL fully obsolete. ...
4 years, 2 months ago (2016-09-30 16:57:59 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2371213002/180001
4 years, 2 months ago (2016-09-30 17:56:28 UTC) #43
commit-bot: I haz the power
Committed patchset #8 (id:180001)
4 years, 2 months ago (2016-09-30 18:05:14 UTC) #45
commit-bot: I haz the power
4 years, 2 months ago (2016-09-30 18:08:32 UTC) #47
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/9a445b35c5fd83eb837ba87f99e67b0dd1611903
Cr-Commit-Position: refs/heads/master@{#422153}

Powered by Google App Engine
This is Rietveld 408576698