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

Issue 10805002: [Sync] Enable adding notifier observers from ProfileSyncService (Closed)

Created:
8 years, 5 months ago by akalin
Modified:
8 years, 4 months ago
CC:
chromium-reviews, Raghu Simha, ncarter (slow), dcheng, nyquist
Visibility:
Public.

Description

[Sync] Enable adding notifier observers from ProfileSyncService Plumb the registrations from the UI thread to the sync thread, and plumb the invalidations back. Add ObjectIdSet <-> ObjectIdPayloadMap conversions. Rename syncapi_unittest.cc to sync_manager_impl_unittest.cc. BUG=137087 TEST= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=149747

Patch Set 1 #

Patch Set 2 : Rebase off 10702074 #

Patch Set 3 : Self-review (still need tests) #

Patch Set 4 : Add tests #

Patch Set 5 : Fix typos #

Total comments: 4

Patch Set 6 : Sync to head, address comments #

Total comments: 4

Patch Set 7 : Address comments #

Total comments: 14
Unified diffs Side-by-side diffs Delta from patch set Stats (+516 lines, -2862 lines) Patch
M chrome/browser/sync/DEPS View 1 2 3 1 chunk +5 lines, -2 lines 0 comments Download
M chrome/browser/sync/glue/chrome_sync_notification_bridge_unittest.cc View 1 2 3 4 5 2 chunks +3 lines, -7 lines 0 comments Download
M chrome/browser/sync/glue/sync_backend_host.h View 1 2 3 4 5 5 chunks +17 lines, -2 lines 0 comments Download
M chrome/browser/sync/glue/sync_backend_host.cc View 1 2 3 4 5 11 chunks +96 lines, -4 lines 0 comments Download
M chrome/browser/sync/glue/sync_backend_host_unittest.cc View 1 2 3 4 5 7 chunks +70 lines, -1 line 0 comments Download
M chrome/browser/sync/profile_sync_service.h View 1 2 3 4 5 4 chunks +25 lines, -0 lines 1 comment Download
M chrome/browser/sync/profile_sync_service.cc View 1 2 3 4 5 6 4 chunks +38 lines, -1 line 0 comments Download
M chrome/browser/sync/profile_sync_service_unittest.cc View 1 2 3 4 5 6 9 chunks +68 lines, -14 lines 2 comments Download
M chrome/browser/sync/test_profile_sync_service.h View 1 2 3 4 5 6 2 chunks +8 lines, -1 line 0 comments Download
M chrome/browser/sync/test_profile_sync_service.cc View 1 2 3 4 5 6 2 chunks +15 lines, -1 line 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M sync/internal_api/public/DEPS View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M sync/internal_api/public/sync_manager.h View 1 2 3 4 5 2 chunks +15 lines, -15 lines 2 comments Download
M sync/internal_api/public/test/fake_sync_manager.h View 1 2 3 4 5 5 chunks +29 lines, -5 lines 3 comments Download
M sync/internal_api/sync_manager_impl.h View 1 2 3 4 5 1 chunk +2 lines, -0 lines 1 comment Download
M sync/internal_api/sync_manager_impl.cc View 1 2 3 4 5 1 chunk +9 lines, -2 lines 0 comments Download
A + sync/internal_api/sync_manager_impl_unittest.cc View 1 2 3 4 5 6 chunks +13 lines, -8 lines 0 comments Download
D sync/internal_api/syncapi_unittest.cc View 1 2 3 4 5 1 chunk +0 lines, -2786 lines 0 comments Download
M sync/internal_api/test/fake_sync_manager.cc View 1 2 3 4 5 6 chunks +70 lines, -9 lines 1 comment Download
M sync/notifier/object_id_payload_map.h View 1 2 3 4 1 chunk +5 lines, -0 lines 1 comment Download
M sync/notifier/object_id_payload_map.cc View 1 2 3 4 1 chunk +19 lines, -0 lines 2 comments Download
M sync/notifier/sync_notifier.h View 1 2 3 1 chunk +4 lines, -3 lines 1 comment Download
M sync/sync.gyp View 1 2 3 4 5 2 chunks +3 lines, -1 line 0 comments Download

Messages

Total messages: 28 (0 generated)
akalin
+tim, +nyquist, +dcheng for initial comments re. the interface. (This isn't quite ready for a ...
8 years, 5 months ago (2012-07-18 01:19:29 UTC) #1
akalin
ping!
8 years, 5 months ago (2012-07-18 18:48:02 UTC) #2
tim (not reviewing)
On 2012/07/18 18:48:02, akalin wrote: > ping! This is for Chrome to Mobile, right? Or ...
8 years, 5 months ago (2012-07-18 19:04:32 UTC) #3
akalin
On 2012/07/18 19:04:32, timsteele wrote: > On 2012/07/18 18:48:02, akalin wrote: > > ping! > ...
8 years, 5 months ago (2012-07-18 19:18:10 UTC) #4
akalin
On 2012/07/18 19:18:10, akalin wrote: > On 2012/07/18 19:04:32, timsteele wrote: > > On 2012/07/18 ...
8 years, 5 months ago (2012-07-18 20:26:30 UTC) #5
nyquist
On 2012/07/18 20:26:30, akalin wrote: > On 2012/07/18 19:18:10, akalin wrote: > > On 2012/07/18 ...
8 years, 5 months ago (2012-07-19 00:12:52 UTC) #6
akalin
msw@, I updated this patch set on http://codereview.chromium.org/10702074/ so you should be able to patch ...
8 years, 5 months ago (2012-07-21 01:11:13 UTC) #7
akalin
+tim for review also (still need to write tests)
8 years, 5 months ago (2012-07-21 01:23:45 UTC) #8
tim (not reviewing)
On 2012/07/21 01:23:45, akalin wrote: > +tim for review also (still need to write tests) ...
8 years, 5 months ago (2012-07-26 22:53:53 UTC) #9
akalin
Yeah you need to keep track of those yourself. But you need to do so ...
8 years, 5 months ago (2012-07-26 23:18:19 UTC) #10
akalin
Wait no you don't. Brain fart... On Jul 26, 2012 4:17 PM, akalin@chromium.org wrote: > ...
8 years, 5 months ago (2012-07-26 23:18:45 UTC) #11
tim (not reviewing)
On 2012/07/26 23:18:45, akalin wrote: > Wait no you don't. Brain fart... > On Jul ...
8 years, 5 months ago (2012-07-26 23:41:08 UTC) #12
akalin
On 2012/07/26 23:41:08, timsteele wrote: > So, what? If there are two separate clients (like ...
8 years, 4 months ago (2012-07-27 00:47:20 UTC) #13
akalin
Okay, I added tests. This is now ready for review. PTAL.
8 years, 4 months ago (2012-07-31 21:23:53 UTC) #14
akalin
On 2012/07/31 21:23:53, akalin wrote: > Okay, I added tests. This is now ready for ...
8 years, 4 months ago (2012-08-01 17:24:56 UTC) #15
tim (not reviewing)
still looking http://codereview.chromium.org/10805002/diff/14002/chrome/browser/sync/profile_sync_service.cc File chrome/browser/sync/profile_sync_service.cc (right): http://codereview.chromium.org/10805002/diff/14002/chrome/browser/sync/profile_sync_service.cc#newcode426 chrome/browser/sync/profile_sync_service.cc:426: // |initialization mode). What would it take ...
8 years, 4 months ago (2012-08-01 21:52:52 UTC) #16
akalin
PTAL https://chromiumcodereview.appspot.com/10805002/diff/14002/chrome/browser/sync/profile_sync_service.cc File chrome/browser/sync/profile_sync_service.cc (right): https://chromiumcodereview.appspot.com/10805002/diff/14002/chrome/browser/sync/profile_sync_service.cc#newcode426 chrome/browser/sync/profile_sync_service.cc:426: // |initialization mode). On 2012/08/01 21:52:52, timsteele wrote: ...
8 years, 4 months ago (2012-08-02 08:05:43 UTC) #17
tim (not reviewing)
couple nits, LGTM once they're addressed https://chromiumcodereview.appspot.com/10805002/diff/18025/chrome/browser/sync/profile_sync_service.cc File chrome/browser/sync/profile_sync_service.cc (right): https://chromiumcodereview.appspot.com/10805002/diff/18025/chrome/browser/sync/profile_sync_service.cc#newcode426 chrome/browser/sync/profile_sync_service.cc:426: // initialization mode). ...
8 years, 4 months ago (2012-08-02 17:43:23 UTC) #18
akalin
Addressed all comments. Committing via commit-bot@. msw@, if you have any concerns about the API, ...
8 years, 4 months ago (2012-08-02 22:06:00 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/akalin@chromium.org/10805002/27001
8 years, 4 months ago (2012-08-02 22:06:51 UTC) #20
commit-bot: I haz the power
Presubmit check for 10805002-27001 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 4 months ago (2012-08-02 22:07:16 UTC) #21
Lei Zhang
chrome/*.gyp* changes LGTM, though I hate the idea of making unit_tests bigger.
8 years, 4 months ago (2012-08-02 22:24:16 UTC) #22
akalin
On 2012/08/02 22:24:16, Lei Zhang wrote: > chrome/*.gyp* changes LGTM, though I hate the idea ...
8 years, 4 months ago (2012-08-02 22:26:48 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/akalin@chromium.org/10805002/27001
8 years, 4 months ago (2012-08-02 22:27:06 UTC) #24
commit-bot: I haz the power
Change committed as 149747
8 years, 4 months ago (2012-08-02 23:49:57 UTC) #25
msw
I'm sorry I didn't review in time, but I mostly just have nits / style ...
8 years, 4 months ago (2012-08-03 05:14:21 UTC) #26
akalin
On 2012/08/03 05:14:21, msw wrote: > I'm sorry I didn't review in time, but I ...
8 years, 4 months ago (2012-08-04 00:01:25 UTC) #27
msw
8 years, 4 months ago (2012-08-04 00:14:44 UTC) #28
On 2012/08/04 00:01:25, akalin wrote:
> On 2012/08/03 05:14:21, msw wrote:
> > I'm sorry I didn't review in time, but I mostly just have nits / style
> comments;
> > as I'm not terribly familiar with this code. The tests are much appreciated.
> > 
> > If anything, I'd say that it's a little odd to group the notification ids
> > everywhere. If they're independently mapped to observers it seems a little
> > simpler to register / unregister them individually, etc. But that's a fairly
> > minor point, and you may have a good reason for your approach.
> 
> Forgot to reply to this.  Basically, passing around ObjectId sets is a little
> more clunky, but allows for better batching.  Also, I want the clients to keep
> track of their own ObjectId sets to avoid problems with 'dangling'
> registrations, etc.

Okay, I can appreciate that; thanks for explaining.

Powered by Google App Engine
This is Rietveld 408576698