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

Issue 13991017: Commit InvalidationService implementations (Closed)

Created:
7 years, 8 months ago by rlarocque
Modified:
7 years, 7 months ago
CC:
chromium-reviews, Raghu Simha, Aaron Boodman, chromium-apps-reviews_chromium.org, haitaol1, tim (not reviewing)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Commit InvalidationService implementations This commit introduces a new ProfileKeyedService, the InvalidationService. Clients may register with this service to receive notifications from a server informing them when they need to fetch updates to their cached state. (In other words, they will receive notifications when their cache has become invalid.) There are three different implementations of this service, all of which inherit from InvalidationFrontend. The current provider of invalidations, ProfileSyncService, also inherits from this interface. The TiclInvalidationService receives notifications through the C++ version of the googlecacheinvalidation (aka. TICL) library. It is used on Chromium for Desktop operating systems. The AndroidInvalidationService receives notifications by listening to the in-process NotificationService (content/public/browser/notification_service.h). The code that actually sends these notifications is a small bridge from Java-land, which is not affected by this CL. The P2PInvalidationService uses XMPP peer-to-peer connections to send and receive invalidations. This has not been used in Chromium for a very long time. We keep it around because some of our integration tests rely on it. This CL also includes an InvalidationServiceFactory to help manage the selection and construction of these InvalidationServices. The tests for these new services are based on a modified version of sync/notifier/invalidator_test_template.h. The P2PInvalidationService is not tested at all because it is itself a test-only utility. In addition to the new code, this CL moves around some old code to help populate a new directory, chrome/browser/invalidation. We're trying to separate invalidations from sync, so the chrome/browser/sync/invalidations directory was no longer needed. Finally, note that this commit does not change Chromium in any way. It adds new classes and test for them, but the rest of the code has not been modified to make use of them. Those changes will happen in a future CL. BUG=124137 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=199520

Patch Set 1 #

Patch Set 2 : Minor updates #

Total comments: 43

Patch Set 3 : Rebase + review fixes #

Patch Set 4 : Update OWNERS file #

Total comments: 2

Patch Set 5 : More updates #

Total comments: 12

Patch Set 6 : Fixes from Fred's review #

Patch Set 7 : Rebase #

Patch Set 8 : Use SigninManagerBase where possible #

Patch Set 9 : Fix Android compile #

Patch Set 10 : Move android files #

Patch Set 11 : Fix bug in gyp file #

Patch Set 12 : Another attempt to fix Android #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+1467 lines, -1135 lines) Patch
M chrome/browser/extensions/api/push_messaging/push_messaging_invalidation_handler.h View 3 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/push_messaging/push_messaging_invalidation_handler.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/push_messaging/push_messaging_invalidation_handler_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
A chrome/browser/invalidation/DEPS View 1 chunk +8 lines, -0 lines 0 comments Download
A chrome/browser/invalidation/OWNERS View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
A + chrome/browser/invalidation/invalidation_frontend.h View 1 2 3 4 5 4 chunks +14 lines, -18 lines 0 comments Download
A chrome/browser/invalidation/invalidation_frontend_test_template.h View 1 chunk +384 lines, -0 lines 0 comments Download
A + chrome/browser/invalidation/invalidation_frontend_test_template.cc View 1 chunk +8 lines, -9 lines 0 comments Download
A chrome/browser/invalidation/invalidation_service_android.h View 1 2 3 4 5 6 7 8 9 1 chunk +71 lines, -0 lines 0 comments Download
A chrome/browser/invalidation/invalidation_service_android.cc View 1 2 3 4 5 6 7 8 9 1 chunk +95 lines, -0 lines 0 comments Download
A chrome/browser/invalidation/invalidation_service_android_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +61 lines, -0 lines 0 comments Download
A chrome/browser/invalidation/invalidation_service_factory.h View 1 2 1 chunk +55 lines, -0 lines 0 comments Download
A chrome/browser/invalidation/invalidation_service_factory.cc View 1 2 3 4 5 6 7 8 9 1 chunk +70 lines, -0 lines 0 comments Download
A chrome/browser/invalidation/invalidation_service_util.h View 1 2 3 4 5 1 chunk +22 lines, -0 lines 0 comments Download
A chrome/browser/invalidation/invalidation_service_util.cc View 1 2 3 4 1 chunk +56 lines, -0 lines 0 comments Download
A + chrome/browser/invalidation/invalidator_storage.h View 1 2 3 4 5 6 4 chunks +6 lines, -10 lines 0 comments Download
A + chrome/browser/invalidation/invalidator_storage.cc View 1 2 3 4 5 6 4 chunks +4 lines, -4 lines 0 comments Download
A + chrome/browser/invalidation/invalidator_storage_unittest.cc View 4 chunks +4 lines, -5 lines 0 comments Download
A chrome/browser/invalidation/p2p_invalidation_service.h View 1 2 1 chunk +65 lines, -0 lines 0 comments Download
A chrome/browser/invalidation/p2p_invalidation_service.cc View 1 2 1 chunk +79 lines, -0 lines 0 comments Download
A chrome/browser/invalidation/ticl_invalidation_service.h View 1 2 3 4 5 6 7 1 chunk +103 lines, -0 lines 0 comments Download
A chrome/browser/invalidation/ticl_invalidation_service.cc View 1 2 3 4 5 6 7 1 chunk +244 lines, -0 lines 2 comments Download
A chrome/browser/invalidation/ticl_invalidation_service_unittest.cc View 1 2 1 chunk +59 lines, -0 lines 0 comments Download
M chrome/browser/prefs/browser_prefs.cc View 1 2 3 4 5 6 3 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/glue/sync_backend_host.h View 2 chunks +6 lines, -2 lines 0 comments Download
M chrome/browser/sync/glue/sync_backend_host.cc View 1 2 3 4 5 6 3 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/glue/sync_backend_host_unittest.cc View 1 2 3 4 5 6 3 chunks +3 lines, -3 lines 0 comments Download
D chrome/browser/sync/invalidation_frontend.h View 1 chunk +0 lines, -99 lines 0 comments Download
D chrome/browser/sync/invalidations/invalidator_storage.h View 1 2 3 4 5 6 1 chunk +0 lines, -109 lines 0 comments Download
D chrome/browser/sync/invalidations/invalidator_storage.cc View 1 2 3 4 5 6 1 chunk +0 lines, -348 lines 0 comments Download
D chrome/browser/sync/invalidations/invalidator_storage_unittest.cc View 1 chunk +0 lines, -507 lines 0 comments Download
M chrome/browser/sync/profile_sync_service.h View 1 2 3 4 5 6 4 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/sync/test_profile_sync_service.h View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/sync/test_profile_sync_service.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 3 chunks +17 lines, -3 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +8 lines, -1 line 0 comments Download

Messages

Total messages: 24 (0 generated)
rlarocque
Here's a more official review request for InvalidationService. Most of the code is carried over ...
7 years, 8 months ago (2013-04-24 20:26:15 UTC) #1
rlarocque
ping.
7 years, 7 months ago (2013-04-29 20:25:52 UTC) #2
dcheng
c/b/e/a/push_messaging LGTM
7 years, 7 months ago (2013-04-29 21:45:23 UTC) #3
rlarocque
ping again.
7 years, 7 months ago (2013-05-01 20:50:02 UTC) #4
tim (not reviewing)
Nice patch. Please add a browser/invalidation/OWNERS file. The reviewers of this CL + yourself seem ...
7 years, 7 months ago (2013-05-03 17:48:23 UTC) #5
dcheng
Some random comments on stuff outside c/b/e/a/push_messaging. https://codereview.chromium.org/13991017/diff/2001/chrome/browser/invalidation/android_invalidation_service.h File chrome/browser/invalidation/android_invalidation_service.h (right): https://codereview.chromium.org/13991017/diff/2001/chrome/browser/invalidation/android_invalidation_service.h#newcode27 chrome/browser/invalidation/android_invalidation_service.h:27: public content::NotificationObserver{ ...
7 years, 7 months ago (2013-05-03 18:07:34 UTC) #6
rlarocque
I've fixed a bunch of issues and responded to your comments. PTAL. https://codereview.chromium.org/13991017/diff/2001/chrome/browser/invalidation/android_invalidation_service.h File chrome/browser/invalidation/android_invalidation_service.h ...
7 years, 7 months ago (2013-05-03 22:16:14 UTC) #7
tim (not reviewing)
https://codereview.chromium.org/13991017/diff/2001/chrome/browser/invalidation/p2p_invalidation_service.cc File chrome/browser/invalidation/p2p_invalidation_service.cc (right): https://codereview.chromium.org/13991017/diff/2001/chrome/browser/invalidation/p2p_invalidation_service.cc#newcode31 chrome/browser/invalidation/p2p_invalidation_service.cc:31: invalidator_id_ = GenerateInvalidatorClientId(); On 2013/05/03 22:16:14, rlarocque wrote: > ...
7 years, 7 months ago (2013-05-03 22:23:50 UTC) #8
rlarocque
Uploaded another update. https://codereview.chromium.org/13991017/diff/2001/chrome/browser/invalidation/p2p_invalidation_service.cc File chrome/browser/invalidation/p2p_invalidation_service.cc (right): https://codereview.chromium.org/13991017/diff/2001/chrome/browser/invalidation/p2p_invalidation_service.cc#newcode31 chrome/browser/invalidation/p2p_invalidation_service.cc:31: invalidator_id_ = GenerateInvalidatorClientId(); On 2013/05/03 22:23:50, ...
7 years, 7 months ago (2013-05-03 22:49:33 UTC) #9
tim (not reviewing)
Changes I reviewed LGTM. (Not speaking for Daniel). It'd be good for Fred to take ...
7 years, 7 months ago (2013-05-03 23:17:26 UTC) #10
rlarocque
On 2013/05/03 23:17:26, timsteele wrote: > Changes I reviewed LGTM. (Not speaking for Daniel). It'd ...
7 years, 7 months ago (2013-05-03 23:22:38 UTC) #11
akalin
Nice patch, LGTM! Typo in CL description (daiton -> dation) https://codereview.chromium.org/13991017/diff/54001/chrome/browser/invalidation/android_invalidation_service.h File chrome/browser/invalidation/android_invalidation_service.h (right): https://codereview.chromium.org/13991017/diff/54001/chrome/browser/invalidation/android_invalidation_service.h#newcode39 ...
7 years, 7 months ago (2013-05-08 00:43:31 UTC) #12
akalin
On 2013/05/08 00:43:31, akalin wrote: > Nice patch, LGTM! > > Typo in CL description ...
7 years, 7 months ago (2013-05-08 00:43:51 UTC) #13
rlarocque
Thanks for the review! Only two more approvals required. Tommy, could you take a look ...
7 years, 7 months ago (2013-05-08 01:22:28 UTC) #14
Bernhard Bauer
c/b/p LGTM.
7 years, 7 months ago (2013-05-08 07:11:03 UTC) #15
nyquist
lgtm for Android parts
7 years, 7 months ago (2013-05-08 22:44:29 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/13991017/69001
7 years, 7 months ago (2013-05-08 22:52:26 UTC) #17
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 7 months ago (2013-05-08 23:21:23 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/13991017/88001
7 years, 7 months ago (2013-05-09 00:08:50 UTC) #19
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 7 months ago (2013-05-09 00:46:05 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/13991017/108006
7 years, 7 months ago (2013-05-10 17:35:27 UTC) #21
commit-bot: I haz the power
Change committed as 199520
7 years, 7 months ago (2013-05-10 19:26:18 UTC) #22
Joao da Silva
Hey Richard, we (Chrome enterprise) are planning to eventually use these interfaces, and a question ...
7 years, 7 months ago (2013-05-15 13:01:59 UTC) #23
rlarocque
7 years, 7 months ago (2013-05-15 20:29:39 UTC) #24
Message was sent while issue was closed.
https://chromiumcodereview.appspot.com/13991017/diff/108006/chrome/browser/in...
File chrome/browser/invalidation/ticl_invalidation_service.cc (right):

https://chromiumcodereview.appspot.com/13991017/diff/108006/chrome/browser/in...
chrome/browser/invalidation/ticl_invalidation_service.cc:51:
chrome::NOTIFICATION_GOOGLE_SIGNED_OUT,
On 2013/05/15 13:02:00, Joao da Silva wrote:
> Question: if there are multiple profiles and one of them signs out, then the
> TiclInvalidationService for all profiles will see this notification, and all
of
> them will stop; should this registration be scoped to
Source<Profile>(profile_)?

You're right, the registration should apply to notifications from this profile
only.

It's also not the only bug related to sign in and sign out.  I'm working on a
patch to fix those issues, and I'll be sure to add this fix to the list.

Thanks for pointing this out.

Powered by Google App Engine
This is Rietveld 408576698