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

Issue 828953004: Add AffiliatedInvalidationServiceProvider (Closed)

Created:
5 years, 11 months ago by bartfab (slow)
Modified:
5 years, 10 months ago
CC:
chromium-reviews, davemoore+watch_chromium.org, nkostylev+watch_chromium.org, oshima+watch_chromium.org, stevenjb+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add AffiliatedInvalidationServiceProvider Device policy pushing requires a connected invalidation service which belongs to an account that is affiliated with the device's enrollment domain. If an affiliated user is logged in and has a connected per-profile invalidation service, that service is used. Otherwise, a device-global invalidation service is spun up. This CL extracts the mechanism from DeviceCloudPolicyInvalidator and generalizes it so that it can be used by any number of consumers. This will allow the same invalidation service to be resued by e.g. device policy pushing, device-local account policy pushing and device remote commands. The CL adds a new AffiliatedInvalidationServiceProvider with tests but does not switch the DeviceCloudPolicyInvalidator to this new infrastructure yet. That will be done in a follow-up CL. BUG=442800 TEST=New unit tests Committed: https://crrev.com/465d8a5a1709bce5780c697407f7a7c4146dfea8 Cr-Commit-Position: refs/heads/master@{#313488}

Patch Set 1 #

Patch Set 2 : Added test accessors; made unit test no longer be a friend #

Total comments: 26

Patch Set 3 : Addressed comments. #

Patch Set 4 : Removed obosolete code accidentally left in previous revision. #

Patch Set 5 : Trimmed unit tests to only check externally visible behavior only. #

Total comments: 16

Patch Set 6 : Simplified tests. Made code reentrant. #

Total comments: 5

Patch Set 7 : Fix corner case in InvalidationServiceObserver constuctor. #

Patch Set 8 : More protection against premature callbacks. #

Patch Set 9 : Added AffiliatedInvalidationServiceProvider::Shutdown() method. #

Total comments: 2

Patch Set 10 : Rebased. #

Patch Set 11 : Style fixes. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+933 lines, -95 lines) Patch
A chrome/browser/chromeos/policy/affiliated_invalidation_service_provider.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +140 lines, -0 lines 0 comments Download
A + chrome/browser/chromeos/policy/affiliated_invalidation_service_provider.cc View 1 2 3 4 5 6 7 8 9 10 8 chunks +147 lines, -95 lines 0 comments Download
A chrome/browser/chromeos/policy/affiliated_invalidation_service_provider_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +627 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h View 1 2 3 4 5 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/policy/browser_policy_connector_chromeos.cc View 1 2 3 4 5 6 7 8 3 chunks +11 lines, -0 lines 0 comments Download
M chrome/browser/invalidation/profile_invalidation_provider_factory.h View 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/chrome_browser_chromeos.gypi View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 35 (5 generated)
bartfab (slow)
Hi Mattias, Could you please review: chrome/browser/chromeos/policy/* Hi Daniel, Could you please review: chrome/browser/invalidation/profile_invalidation_provider_factory.h
5 years, 11 months ago (2015-01-08 18:31:08 UTC) #2
dcheng
lgtm for c/b/invalidation changes. However, it seems unfortunate to have to keep friending tests. If ...
5 years, 11 months ago (2015-01-09 08:00:43 UTC) #3
bartfab (slow)
On 2015/01/09 08:00:43, dcheng wrote: > lgtm for c/b/invalidation changes. > > However, it seems ...
5 years, 11 months ago (2015-01-09 19:23:35 UTC) #4
Mattias Nissler (ping if slow)
Code looks sane in general, but the unit tests aren't really focusing on the public ...
5 years, 11 months ago (2015-01-13 09:50:16 UTC) #5
bartfab (slow)
https://codereview.chromium.org/828953004/diff/20001/chrome/browser/chromeos/policy/affiliated_invalidation_service_provider.cc File chrome/browser/chromeos/policy/affiliated_invalidation_service_provider.cc (right): https://codereview.chromium.org/828953004/diff/20001/chrome/browser/chromeos/policy/affiliated_invalidation_service_provider.cc#newcode164 chrome/browser/chromeos/policy/affiliated_invalidation_service_provider.cc:164: syncer::INVALIDATIONS_ENABLED) { On 2015/01/13 09:50:15, Mattias Nissler wrote: > ...
5 years, 11 months ago (2015-01-13 17:45:23 UTC) #6
bartfab (slow)
Hi Mattias, Please take another look. Your persistence paid off: I significantly trimmed the unit ...
5 years, 11 months ago (2015-01-16 10:34:25 UTC) #7
Mattias Nissler (ping if slow)
Tests look much better indeed, thanks for that. Two major points of feedback: 1. Re-entrancy ...
5 years, 11 months ago (2015-01-16 13:24:29 UTC) #8
bartfab (slow)
https://codereview.chromium.org/828953004/diff/80001/chrome/browser/chromeos/policy/affiliated_invalidation_service_provider.cc File chrome/browser/chromeos/policy/affiliated_invalidation_service_provider.cc (right): https://codereview.chromium.org/828953004/diff/80001/chrome/browser/chromeos/policy/affiliated_invalidation_service_provider.cc#newcode190 chrome/browser/chromeos/policy/affiliated_invalidation_service_provider.cc:190: if (invalidation_service_ &&consumer_count_ == 0) { On 2015/01/16 13:24:29, ...
5 years, 11 months ago (2015-01-20 13:22:47 UTC) #9
Mattias Nissler (ping if slow)
Looks good mostly, just one more quick suggestion for an improvement. Please consider, I might ...
5 years, 11 months ago (2015-01-21 12:57:29 UTC) #10
bartfab (slow)
https://codereview.chromium.org/828953004/diff/100001/chrome/browser/chromeos/policy/affiliated_invalidation_service_provider.cc File chrome/browser/chromeos/policy/affiliated_invalidation_service_provider.cc (right): https://codereview.chromium.org/828953004/diff/100001/chrome/browser/chromeos/policy/affiliated_invalidation_service_provider.cc#newcode247 chrome/browser/chromeos/policy/affiliated_invalidation_service_provider.cc:247: if (!invalidation_service_) On 2015/01/21 12:57:28, Mattias Nissler wrote: > ...
5 years, 11 months ago (2015-01-21 13:38:48 UTC) #11
Mattias Nissler (ping if slow)
https://codereview.chromium.org/828953004/diff/100001/chrome/browser/chromeos/policy/affiliated_invalidation_service_provider.cc File chrome/browser/chromeos/policy/affiliated_invalidation_service_provider.cc (right): https://codereview.chromium.org/828953004/diff/100001/chrome/browser/chromeos/policy/affiliated_invalidation_service_provider.cc#newcode247 chrome/browser/chromeos/policy/affiliated_invalidation_service_provider.cc:247: if (!invalidation_service_) On 2015/01/21 13:38:48, bartfab wrote: > On ...
5 years, 11 months ago (2015-01-21 14:19:26 UTC) #12
bartfab (slow)
On 2015/01/21 14:19:26, Mattias Nissler wrote: > https://codereview.chromium.org/828953004/diff/100001/chrome/browser/chromeos/policy/affiliated_invalidation_service_provider.cc > File chrome/browser/chromeos/policy/affiliated_invalidation_service_provider.cc > (right): > > ...
5 years, 11 months ago (2015-01-21 14:36:18 UTC) #13
bartfab (slow)
5 years, 11 months ago (2015-01-21 14:38:27 UTC) #14
bartfab (slow)
https://codereview.chromium.org/828953004/diff/100001/chrome/browser/chromeos/policy/affiliated_invalidation_service_provider.cc File chrome/browser/chromeos/policy/affiliated_invalidation_service_provider.cc (right): https://codereview.chromium.org/828953004/diff/100001/chrome/browser/chromeos/policy/affiliated_invalidation_service_provider.cc#newcode247 chrome/browser/chromeos/policy/affiliated_invalidation_service_provider.cc:247: if (!invalidation_service_) On 2015/01/21 14:19:26, Mattias Nissler wrote: > ...
5 years, 11 months ago (2015-01-21 14:45:23 UTC) #15
Mattias Nissler (ping if slow)
https://codereview.chromium.org/828953004/diff/100001/chrome/browser/chromeos/policy/affiliated_invalidation_service_provider.cc File chrome/browser/chromeos/policy/affiliated_invalidation_service_provider.cc (right): https://codereview.chromium.org/828953004/diff/100001/chrome/browser/chromeos/policy/affiliated_invalidation_service_provider.cc#newcode247 chrome/browser/chromeos/policy/affiliated_invalidation_service_provider.cc:247: if (!invalidation_service_) On 2015/01/21 14:45:23, bartfab wrote: > On ...
5 years, 11 months ago (2015-01-21 14:59:58 UTC) #16
bartfab (slow)
On 2015/01/21 14:59:58, Mattias Nissler wrote: > https://codereview.chromium.org/828953004/diff/100001/chrome/browser/chromeos/policy/affiliated_invalidation_service_provider.cc > File chrome/browser/chromeos/policy/affiliated_invalidation_service_provider.cc > (right): > > ...
5 years, 11 months ago (2015-01-21 15:49:38 UTC) #17
Mattias Nissler (ping if slow)
On 2015/01/21 15:49:38, bartfab wrote: > On 2015/01/21 14:59:58, Mattias Nissler wrote: > > > ...
5 years, 11 months ago (2015-01-21 15:56:38 UTC) #18
bartfab (slow)
On 2015/01/21 15:56:38, Mattias Nissler wrote: > On 2015/01/21 15:49:38, bartfab wrote: > > On ...
5 years, 11 months ago (2015-01-21 15:58:09 UTC) #19
Mattias Nissler (ping if slow)
On 2015/01/21 15:58:09, bartfab wrote: > On 2015/01/21 15:56:38, Mattias Nissler wrote: > > On ...
5 years, 11 months ago (2015-01-22 11:27:28 UTC) #20
bartfab (slow)
On 2015/01/22 11:27:28, Mattias Nissler wrote: > On 2015/01/21 15:58:09, bartfab wrote: > > On ...
5 years, 11 months ago (2015-01-22 12:35:35 UTC) #21
Mattias Nissler (ping if slow)
[Dropping history as we're hitting rietveld limits] Nikita, looping you in here for a cros ...
5 years, 10 months ago (2015-01-26 10:44:20 UTC) #23
Nikita (slow)
On 2015/01/26 10:44:20, Mattias Nissler wrote: > [Dropping history as we're hitting rietveld limits] > ...
5 years, 10 months ago (2015-01-27 07:41:13 UTC) #24
bartfab (slow)
Hi Mattias, Please take another look.
5 years, 10 months ago (2015-01-27 15:17:19 UTC) #25
Mattias Nissler (ping if slow)
This LGTM now after you've verified that the DCHECK is correct (or removed it if ...
5 years, 10 months ago (2015-01-28 09:02:23 UTC) #26
bartfab (slow)
https://codereview.chromium.org/828953004/diff/160001/chrome/browser/chromeos/policy/affiliated_invalidation_service_provider.cc File chrome/browser/chromeos/policy/affiliated_invalidation_service_provider.cc (right): https://codereview.chromium.org/828953004/diff/160001/chrome/browser/chromeos/policy/affiliated_invalidation_service_provider.cc#newcode142 chrome/browser/chromeos/policy/affiliated_invalidation_service_provider.cc:142: DCHECK(is_shut_down_); On 2015/01/28 09:02:23, Mattias Nissler wrote: > I'm ...
5 years, 10 months ago (2015-01-28 09:28:31 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/828953004/180001
5 years, 10 months ago (2015-01-28 09:33:57 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/19058)
5 years, 10 months ago (2015-01-28 10:03:00 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/828953004/200001
5 years, 10 months ago (2015-01-28 10:23:59 UTC) #33
commit-bot: I haz the power
Committed patchset #11 (id:200001)
5 years, 10 months ago (2015-01-28 12:08:30 UTC) #34
commit-bot: I haz the power
5 years, 10 months ago (2015-01-28 12:10:33 UTC) #35
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/465d8a5a1709bce5780c697407f7a7c4146dfea8
Cr-Commit-Position: refs/heads/master@{#313488}

Powered by Google App Engine
This is Rietveld 408576698