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

Issue 70863002: Refactored the ComponentCloudPolicyService. (Closed)

Created:
7 years, 1 month ago by Joao da Silva
Modified:
7 years, 1 month ago
Reviewers:
bartfab (slow)
CC:
chromium-reviews, stevenjb+watch_chromium.org, davemoore+watch_chromium.org, oshima+watch_chromium.org, nkostylev+watch_chromium.org
Visibility:
Public.

Description

Refactored the ComponentCloudPolicyService. The ComponentCloudPolicyService is used to fetch cloud policy for components of Chrome, such as extensions. This feature is currently disabled behind a flag, on ChromeOS. This refactor builds on recent changes to the policy code that make it possible to significantly simplify this code: - the list of components now comes from a SchemaRegistry - all the dependencies come in the constructor (no more late Connect()) - cancel pending updates when components change This is still a WIP; the next step is to make the ComponentCloudPolicyService a PKS and decouple it from the UserCloudPolicyManagerChromeOS. BUG=108992 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=235638

Patch Set 1 #

Patch Set 2 : rebase #

Patch Set 3 : rebase #

Patch Set 4 : rebase #

Patch Set 5 : rebase #

Total comments: 32

Patch Set 6 : addressed comments, rebase #

Patch Set 7 : typo #

Patch Set 8 : rebase, using base::Timer #

Total comments: 4

Patch Set 9 : rebased, using OneShotTimer #

Patch Set 10 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+444 lines, -569 lines) Patch
M chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h View 6 chunks +8 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.cc View 8 chunks +37 lines, -23 lines 0 comments Download
M chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos_unittest.cc View 1 2 3 4 5 2 chunks +1 line, -2 lines 0 comments Download
M chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chromeos.cc View 2 chunks +1 line, -11 lines 0 comments Download
M chrome/browser/policy/cloud/cloud_policy_core.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/policy/cloud/component_cloud_policy_service.h View 1 2 3 4 5 6 7 8 6 chunks +35 lines, -43 lines 0 comments Download
M chrome/browser/policy/cloud/component_cloud_policy_service.cc View 1 2 3 4 5 6 7 8 11 chunks +207 lines, -286 lines 0 comments Download
M chrome/browser/policy/cloud/component_cloud_policy_service_unittest.cc View 1 2 3 4 5 14 chunks +105 lines, -188 lines 0 comments Download
M chrome/browser/policy/cloud/component_cloud_policy_store.cc View 1 chunk +5 lines, -1 line 0 comments Download
M chrome/browser/policy/cloud/component_cloud_policy_updater.h View 2 chunks +8 lines, -0 lines 0 comments Download
M chrome/browser/policy/cloud/component_cloud_policy_updater.cc View 4 chunks +13 lines, -9 lines 0 comments Download
M chrome/browser/policy/cloud/component_cloud_policy_updater_unittest.cc View 1 2 3 4 5 2 chunks +17 lines, -2 lines 0 comments Download
M chrome/browser/policy/configuration_policy_provider.h View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/policy/configuration_policy_provider.cc View 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
Joao da Silva
Note that component_cloud_policy_browsertest.cc didn't have any changes and still works end-to-end with an extension using ...
7 years, 1 month ago (2013-11-12 22:32:37 UTC) #1
bartfab (slow)
https://codereview.chromium.org/70863002/diff/720001/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos_unittest.cc File chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos_unittest.cc (right): https://codereview.chromium.org/70863002/diff/720001/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos_unittest.cc#newcode24 chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos_unittest.cc:24: #include "chrome/browser/policy/cloud/resource_cache.h" Nit: No longer used. https://codereview.chromium.org/70863002/diff/720001/chrome/browser/policy/cloud/component_cloud_policy_service.cc File chrome/browser/policy/cloud/component_cloud_policy_service.cc ...
7 years, 1 month ago (2013-11-14 14:13:12 UTC) #2
Joao da Silva
Thanks for the review. PTAL https://codereview.chromium.org/70863002/diff/720001/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos_unittest.cc File chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos_unittest.cc (right): https://codereview.chromium.org/70863002/diff/720001/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos_unittest.cc#newcode24 chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos_unittest.cc:24: #include "chrome/browser/policy/cloud/resource_cache.h" On 2013/11/14 ...
7 years, 1 month ago (2013-11-14 14:56:41 UTC) #3
bartfab (slow)
https://codereview.chromium.org/70863002/diff/720001/chrome/browser/policy/cloud/component_cloud_policy_service.cc File chrome/browser/policy/cloud/component_cloud_policy_service.cc (right): https://codereview.chromium.org/70863002/diff/720001/chrome/browser/policy/cloud/component_cloud_policy_service.cc#newcode354 chrome/browser/policy/cloud/component_cloud_policy_service.cc:354: // new schema will equal the older version in ...
7 years, 1 month ago (2013-11-14 15:02:21 UTC) #4
Joao da Silva
Replaced the CancellableCallback with a Timer. The delay is currently 0 and I've left the ...
7 years, 1 month ago (2013-11-15 09:28:15 UTC) #5
bartfab (slow)
https://codereview.chromium.org/70863002/diff/410003/chrome/browser/policy/cloud/component_cloud_policy_service.cc File chrome/browser/policy/cloud/component_cloud_policy_service.cc (right): https://codereview.chromium.org/70863002/diff/410003/chrome/browser/policy/cloud/component_cloud_policy_service.cc#newcode219 chrome/browser/policy/cloud/component_cloud_policy_service.cc:219: schema_update_timer_(false, false), Nit: If you used a OneShotTimer instead ...
7 years, 1 month ago (2013-11-15 12:20:31 UTC) #6
bartfab (slow)
Forgot to say, LGTM.
7 years, 1 month ago (2013-11-15 12:21:36 UTC) #7
Joao da Silva
https://codereview.chromium.org/70863002/diff/410003/chrome/browser/policy/cloud/component_cloud_policy_service.cc File chrome/browser/policy/cloud/component_cloud_policy_service.cc (right): https://codereview.chromium.org/70863002/diff/410003/chrome/browser/policy/cloud/component_cloud_policy_service.cc#newcode219 chrome/browser/policy/cloud/component_cloud_policy_service.cc:219: schema_update_timer_(false, false), On 2013/11/15 12:20:31, bartfab wrote: > Nit: ...
7 years, 1 month ago (2013-11-15 14:58:08 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joaodasilva@chromium.org/70863002/490002
7 years, 1 month ago (2013-11-15 15:00:52 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joaodasilva@chromium.org/70863002/490002
7 years, 1 month ago (2013-11-15 22:22:39 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joaodasilva@chromium.org/70863002/490002
7 years, 1 month ago (2013-11-16 01:02:16 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joaodasilva@chromium.org/70863002/1320001
7 years, 1 month ago (2013-11-17 20:11:09 UTC) #12
commit-bot: I haz the power
7 years, 1 month ago (2013-11-18 06:06:11 UTC) #13
Message was sent while issue was closed.
Change committed as 235638

Powered by Google App Engine
This is Rietveld 408576698