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

Issue 19733003: Implement cloud policy invalidations using the invalidation service framework. (Closed)

Created:
7 years, 5 months ago by Steve Condie
Modified:
7 years, 3 months ago
CC:
chromium-reviews, jar (doing other things), Ilya Sherman, joaodasilva+watch_chromium.org, asvitkine+watch_chromium.org, oshima+watch_chromium.org, stevenjb+watch_chromium.org, davemoore+watch_chromium.org, nkostylev+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Implement cloud policy invalidations using the invalidation service framework. BUG=263287 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=214555

Patch Set 1 #

Total comments: 67

Patch Set 2 : #

Total comments: 24

Patch Set 3 : #

Total comments: 27

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Total comments: 2

Patch Set 7 : #

Total comments: 16

Patch Set 8 : #

Patch Set 9 : #

Total comments: 14

Patch Set 10 : #

Patch Set 11 : #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+2022 lines, -25 lines) Patch
M chrome/app/policy/policy_templates.json View 1 2 3 4 5 6 7 8 9 10 2 chunks +19 lines, -1 line 0 comments Download
M chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.cc View 1 2 3 4 5 6 4 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/invalidation/fake_invalidation_service.h View 1 2 chunks +23 lines, -1 line 0 comments Download
M chrome/browser/invalidation/fake_invalidation_service.cc View 1 2 3 4 3 chunks +39 lines, -4 lines 0 comments Download
M chrome/browser/policy/cloud/cloud_policy_client.h View 1 2 3 4 5 6 7 8 3 chunks +19 lines, -0 lines 0 comments Download
M chrome/browser/policy/cloud/cloud_policy_client.cc View 1 2 3 4 chunks +17 lines, -0 lines 0 comments Download
M chrome/browser/policy/cloud/cloud_policy_client_unittest.cc View 2 chunks +35 lines, -0 lines 0 comments Download
A chrome/browser/policy/cloud/cloud_policy_invalidator.h View 1 2 3 4 5 6 7 1 chunk +221 lines, -0 lines 0 comments Download
A chrome/browser/policy/cloud/cloud_policy_invalidator.cc View 1 2 3 4 5 6 7 8 9 1 chunk +336 lines, -0 lines 1 comment Download
A chrome/browser/policy/cloud/cloud_policy_invalidator_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +724 lines, -0 lines 0 comments Download
M chrome/browser/policy/cloud/cloud_policy_manager.h View 1 2 3 4 5 6 7 8 5 chunks +27 lines, -1 line 1 comment Download
M chrome/browser/policy/cloud/cloud_policy_manager.cc View 1 2 3 4 5 6 7 4 chunks +40 lines, -0 lines 3 comments Download
M chrome/browser/policy/cloud/cloud_policy_manager_unittest.cc View 1 2 3 4 5 6 7 5 chunks +82 lines, -0 lines 0 comments Download
M chrome/browser/policy/cloud/cloud_policy_service.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/policy/cloud/cloud_policy_service_unittest.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/policy/cloud/cloud_policy_store.h View 1 2 3 4 5 6 7 8 3 chunks +28 lines, -0 lines 2 comments Download
M chrome/browser/policy/cloud/cloud_policy_store.cc View 1 2 4 chunks +22 lines, -2 lines 0 comments Download
M chrome/browser/policy/cloud/enterprise_metrics.h View 1 2 3 4 5 6 7 8 9 1 chunk +26 lines, -3 lines 0 comments Download
M chrome/browser/policy/cloud/enterprise_metrics.cc View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -3 lines 0 comments Download
M chrome/browser/policy/cloud/mock_cloud_policy_client.h View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/policy/cloud/mock_cloud_policy_store.h View 1 1 chunk +1 line, -0 lines 0 comments Download
A chrome/browser/policy/cloud/user_cloud_policy_invalidator.h View 1 2 3 4 1 chunk +57 lines, -0 lines 0 comments Download
A chrome/browser/policy/cloud/user_cloud_policy_invalidator.cc View 1 2 3 4 5 6 7 1 chunk +50 lines, -0 lines 1 comment Download
A chrome/browser/policy/cloud/user_cloud_policy_invalidator_factory.h View 1 2 3 1 chunk +36 lines, -0 lines 0 comments Download
A chrome/browser/policy/cloud/user_cloud_policy_invalidator_factory.cc View 1 2 3 1 chunk +76 lines, -0 lines 0 comments Download
M chrome/browser/policy/cloud/user_cloud_policy_manager.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/policy/cloud/user_cloud_policy_store_unittest.cc View 7 chunks +46 lines, -0 lines 0 comments Download
M chrome/browser/policy/proto/cloud/device_management_backend.proto View 2 chunks +20 lines, -0 lines 0 comments Download
M chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/chrome_switches.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/common/chrome_switches.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +9 lines, -0 lines 0 comments Download
M chrome/test/data/policy/policy_test_cases.json View 1 2 3 4 5 6 7 8 9 10 1 chunk +6 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 10 4 chunks +31 lines, -0 lines 0 comments Download

Messages

Total messages: 37 (0 generated)
Steve Condie
7 years, 5 months ago (2013-07-23 04:54:51 UTC) #1
rlarocque
I'm still hoping to temporarily disable the acknowledgement functionality when adding trickles support, though this ...
7 years, 5 months ago (2013-07-23 17:43:08 UTC) #2
Joao da Silva
First pass at this, I need to look again at the invalidator but overall looks ...
7 years, 5 months ago (2013-07-23 20:44:46 UTC) #3
rlarocque
One of Joao's comments just reminded me about mobile platforms. The Android and iOS implementations ...
7 years, 5 months ago (2013-07-23 20:55:05 UTC) #4
Joao da Silva
Richard, thanks for the heads up. I'm currently working on policy on Android, and we're ...
7 years, 5 months ago (2013-07-23 21:34:10 UTC) #5
stepco1
Yes, Tommy told me a while ago we'd need to do some extra work to ...
7 years, 5 months ago (2013-07-23 21:36:50 UTC) #6
Steve Condie
https://codereview.chromium.org/19733003/diff/1/chrome/browser/chromeos/policy/device_local_account_policy_store.cc File chrome/browser/chromeos/policy/device_local_account_policy_store.cc (right): https://codereview.chromium.org/19733003/diff/1/chrome/browser/chromeos/policy/device_local_account_policy_store.cc#newcode82 chrome/browser/chromeos/policy/device_local_account_policy_store.cc:82: validator->hash_value()); On 2013/07/23 20:44:47, Joao da Silva wrote: > ...
7 years, 5 months ago (2013-07-24 01:42:04 UTC) #7
Joao da Silva
This is almost there, but I just realized that the CloudPolicyManager can't depend on any ...
7 years, 5 months ago (2013-07-24 15:34:07 UTC) #8
rlarocque
https://codereview.chromium.org/19733003/diff/1/chrome/browser/invalidation/fake_invalidation_service.h File chrome/browser/invalidation/fake_invalidation_service.h (right): https://codereview.chromium.org/19733003/diff/1/chrome/browser/invalidation/fake_invalidation_service.h#newcode58 chrome/browser/invalidation/fake_invalidation_service.h:58: typedef std::list<std::pair<syncer::AckHandle, invalidation::ObjectId> > On 2013/07/24 01:42:04, stepco wrote: ...
7 years, 5 months ago (2013-07-24 16:40:44 UTC) #9
Steve Condie
I haven't tested this patch yet, so it probably doesn't work, but I thought I'd ...
7 years, 5 months ago (2013-07-25 01:18:08 UTC) #10
Joao da Silva
I think the code structure is right, and from my side this is ready to ...
7 years, 4 months ago (2013-07-25 18:03:53 UTC) #11
rlarocque
https://codereview.chromium.org/19733003/diff/42001/chrome/browser/invalidation/fake_invalidation_service.h File chrome/browser/invalidation/fake_invalidation_service.h (right): https://codereview.chromium.org/19733003/diff/42001/chrome/browser/invalidation/fake_invalidation_service.h#newcode63 chrome/browser/invalidation/fake_invalidation_service.h:63: AckHandleList unacknowledged_handles_; The way ack tracking currently works is ...
7 years, 4 months ago (2013-07-25 19:23:39 UTC) #12
Steve Condie
https://codereview.chromium.org/19733003/diff/24001/chrome/browser/policy/cloud/cloud_policy_client.cc File chrome/browser/policy/cloud/cloud_policy_client.cc (right): https://codereview.chromium.org/19733003/diff/24001/chrome/browser/policy/cloud/cloud_policy_client.cc#newcode197 chrome/browser/policy/cloud/cloud_policy_client.cc:197: fetched_invalidation_version_ = invalidation_version_; On 2013/07/25 18:03:53, Joao da Silva ...
7 years, 4 months ago (2013-07-26 01:39:25 UTC) #13
Steve Condie
https://codereview.chromium.org/19733003/diff/42001/chrome/browser/policy/cloud/cloud_policy_manager.h File chrome/browser/policy/cloud/cloud_policy_manager.h (right): https://codereview.chromium.org/19733003/diff/42001/chrome/browser/policy/cloud/cloud_policy_manager.h#newcode92 chrome/browser/policy/cloud/cloud_policy_manager.h:92: CloudPolicyInvalidationReplayer invalidation_replayer_; On 2013/07/26 01:39:25, stepco wrote: > On ...
7 years, 4 months ago (2013-07-26 08:47:27 UTC) #14
Steve Condie
Fixed some problems found by trybot Removed invalidation replayer in favor of simpler solution
7 years, 4 months ago (2013-07-26 19:17:23 UTC) #15
Steve Condie
Synced forward so trybot can apply patch
7 years, 4 months ago (2013-07-26 20:12:25 UTC) #16
rlarocque
I don't think I have anything more to add, so LGTM with nits. https://codereview.chromium.org/19733003/diff/42001/chrome/browser/policy/cloud/cloud_policy_invalidator_unittest.cc File ...
7 years, 4 months ago (2013-07-29 18:29:53 UTC) #17
Steve Condie
Thanks Richard https://codereview.chromium.org/19733003/diff/42001/chrome/browser/policy/cloud/cloud_policy_invalidator_unittest.cc File chrome/browser/policy/cloud/cloud_policy_invalidator_unittest.cc (right): https://codereview.chromium.org/19733003/diff/42001/chrome/browser/policy/cloud/cloud_policy_invalidator_unittest.cc#newcode461 chrome/browser/policy/cloud/cloud_policy_invalidator_unittest.cc:461: ExpectInvalidationInfo(12, "test_payload"); On 2013/07/29 18:29:54, rlarocque wrote: ...
7 years, 4 months ago (2013-07-29 18:53:07 UTC) #18
Joao da Silva
Only mechanical changes left, so lgtm. https://codereview.chromium.org/19733003/diff/89001/chrome/browser/policy/cloud/cloud_policy_manager.cc File chrome/browser/policy/cloud/cloud_policy_manager.cc (right): https://codereview.chromium.org/19733003/diff/89001/chrome/browser/policy/cloud/cloud_policy_manager.cc#newcode35 chrome/browser/policy/cloud/cloud_policy_manager.cc:35: const base::Closure& initialize_invalidator) ...
7 years, 4 months ago (2013-07-29 19:44:32 UTC) #19
Steve Condie
https://codereview.chromium.org/19733003/diff/89001/chrome/browser/policy/cloud/cloud_policy_manager.cc File chrome/browser/policy/cloud/cloud_policy_manager.cc (right): https://codereview.chromium.org/19733003/diff/89001/chrome/browser/policy/cloud/cloud_policy_manager.cc#newcode35 chrome/browser/policy/cloud/cloud_policy_manager.cc:35: const base::Closure& initialize_invalidator) { On 2013/07/29 19:44:32, Joao da ...
7 years, 4 months ago (2013-07-29 20:44:50 UTC) #20
Joao da Silva
lgtm! Good stuff :-)
7 years, 4 months ago (2013-07-29 20:50:02 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/stepco@chromium.org/19733003/118002
7 years, 4 months ago (2013-07-29 22:19:16 UTC) #22
Steve Condie
Added Ilya for new histogram LGTM. Added Elliot for LGTM for new profile-keyed service added ...
7 years, 4 months ago (2013-07-29 23:32:56 UTC) #23
Ilya Sherman
https://codereview.chromium.org/19733003/diff/118002/chrome/browser/policy/cloud/cloud_policy_invalidator.cc File chrome/browser/policy/cloud/cloud_policy_invalidator.cc (right): https://codereview.chromium.org/19733003/diff/118002/chrome/browser/policy/cloud/cloud_policy_invalidator.cc#newcode193 chrome/browser/policy/cloud/cloud_policy_invalidator.cc:193: UMA_HISTOGRAM_ENUMERATION( nit: An UMA_HISTOGRAM_BOOLEAN would probably serve you better ...
7 years, 4 months ago (2013-07-30 01:23:15 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/stepco@chromium.org/19733003/118002
7 years, 4 months ago (2013-07-30 01:25:05 UTC) #25
Steve Condie
Response to Ilya's review of new histograms and usage. https://codereview.chromium.org/19733003/diff/118002/chrome/browser/policy/cloud/cloud_policy_invalidator.cc File chrome/browser/policy/cloud/cloud_policy_invalidator.cc (right): https://codereview.chromium.org/19733003/diff/118002/chrome/browser/policy/cloud/cloud_policy_invalidator.cc#newcode193 chrome/browser/policy/cloud/cloud_policy_invalidator.cc:193: ...
7 years, 4 months ago (2013-07-30 06:12:31 UTC) #26
commit-bot: I haz the power
Failed to trigger a try job on chromium_presubmit HTTP Error 400: Bad Request
7 years, 4 months ago (2013-07-30 07:18:05 UTC) #27
Ilya Sherman
histograms LGTM, thanks.
7 years, 4 months ago (2013-07-30 07:55:01 UTC) #28
Steve Condie
Not sure if Elliot is available, so added some more owners from chrome/browser/profiles for the ...
7 years, 4 months ago (2013-07-30 18:07:22 UTC) #29
Elliot Glaysher
profiles lgtm
7 years, 4 months ago (2013-07-30 18:10:10 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/stepco@chromium.org/19733003/140001
7 years, 4 months ago (2013-07-30 20:39:24 UTC) #31
Steve Condie
Synced to resolve conflict in policy_templates.json
7 years, 4 months ago (2013-07-30 21:18:34 UTC) #32
commit-bot: I haz the power
Failed to trigger a try job on chromium_presubmit HTTP Error 400: Bad Request
7 years, 4 months ago (2013-07-30 22:34:03 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/stepco@chromium.org/19733003/155001
7 years, 4 months ago (2013-07-30 22:35:33 UTC) #34
commit-bot: I haz the power
Change committed as 214555
7 years, 4 months ago (2013-07-31 04:15:33 UTC) #35
Mattias Nissler (ping if slow)
Steve, I got interested in this CL when debugging crashes, and I've added a couple ...
7 years, 3 months ago (2013-08-28 14:20:39 UTC) #36
Steve Condie
7 years, 3 months ago (2013-09-07 01:11:19 UTC) #37
Message was sent while issue was closed.
https://codereview.chromium.org/19733003/diff/155001/chrome/browser/policy/cl...
File chrome/browser/policy/cloud/cloud_policy_store.h (right):

https://codereview.chromium.org/19733003/diff/155001/chrome/browser/policy/cl...
chrome/browser/policy/cloud/cloud_policy_store.h:78: bool policy_changed() const
{
On 2013/08/28 14:20:40, Mattias Nissler wrote:
> AFAICS, the only user of this is CloudPolicyInvalidator::GetRefreshMetric.
Thus,
> it'd be preferable to do change detection there instead of complicating the
> public interface of CloudPolicyStore.

Opened bug 286613 to track refactoring the policy change code as suggested by
this comment.

I believe all the remaining comments from Mattias have been addressed in
https://codereview.chromium.org/23592017/

Powered by Google App Engine
This is Rietveld 408576698