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

Issue 12022041: Separate local and remote sync invalidations (Closed)

Created:
7 years, 11 months ago by rlarocque
Modified:
7 years, 10 months ago
Reviewers:
nyquist, brettw, Nicolas Zea
CC:
akalin, tim (not reviewing), dcheng, nyquist
Visibility:
Public.

Description

Separate local and remote sync invalidations The old design used ChromeSyncNotificationsBridge to register for both NOTIFICATION_SYNC_REFRESH_LOCAL and NOTIFICATION_SYNC_REFRESH_REMOTE. The first of these is issued when some component decides that the syncer ought to perform an unsolicited GetUpdates for some type, while the second is an Android-specific mechanism for receiving remote invalidations. In either case, the ChromeSyncNotificationsBridge would forward the invalidations to the SyncManager through the BridgedInvalidator as though they had come from any other invalidator. In this new design, the local and remote invalidations sources are kept distinct. The SyncBackendHost is now responsible for listening to and forwarding NOTIFICATION_SYNC_REFRESH_LOCAL. Note that there is no longer any type-specific filtering performed as we receive notifications; it will be up to the SyncManager to ignore notifications for disbaled types. The successor to ChromeSyncNotificationsBridge, AndroidInvalidatorBridge, is responsible only for forwarding NOTIFICATION_SYNC_REFRESH_REMOTE notificaitons. It is passed to the SyncManager only if OS_ANDROID is defined. Since there is only one source of remote invalidations, the BridgedInvalidator would seem to be no longer necessary. Unfortunately, this is not the case. The BridgedInvalidator was useful in part because it wrapped the UI-thread-owned ChromeSyncNotificationsBridge without owning it, so the SyncManager's destruction would not affect it. This wrapping functionality is still needed by the AndroidInvalidatorBridge. The BridgedInvalidator has been modified to only wrap a single AndroidInvalidatorBridge, and renamed to AndroidInvalidatorBridgeProxy. BUG=124143 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=179546

Patch Set 1 #

Patch Set 2 : Update #

Patch Set 3 : Rebase #

Patch Set 4 : Rebase #

Patch Set 5 : Remove NOTREACHED() for android unit tests #

Patch Set 6 : Base files were missing #

Patch Set 7 : Base files: still missing. #

Total comments: 4

Patch Set 8 : Respond to review comments #

Total comments: 1

Patch Set 9 : Style fix #

Patch Set 10 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+465 lines, -978 lines) Patch
A + chrome/browser/sync/glue/android_invalidator_bridge.h View 1 2 3 4 5 6 7 8 9 3 chunks +26 lines, -16 lines 0 comments Download
A + chrome/browser/sync/glue/android_invalidator_bridge.cc View 1 2 3 4 5 6 7 8 9 5 chunks +36 lines, -32 lines 0 comments Download
A chrome/browser/sync/glue/android_invalidator_bridge_proxy.h View 1 2 3 4 5 6 7 8 9 1 chunk +49 lines, -0 lines 0 comments Download
A chrome/browser/sync/glue/android_invalidator_bridge_proxy.cc View 1 2 3 4 5 6 7 8 9 1 chunk +57 lines, -0 lines 0 comments Download
A chrome/browser/sync/glue/android_invalidator_bridge_proxy_unittest.cc View 1 1 chunk +94 lines, -0 lines 0 comments Download
A + chrome/browser/sync/glue/android_invalidator_bridge_unittest.cc View 1 7 chunks +11 lines, -41 lines 0 comments Download
D chrome/browser/sync/glue/bridged_invalidator.h View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -61 lines 0 comments Download
D chrome/browser/sync/glue/bridged_invalidator.cc View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -70 lines 0 comments Download
D chrome/browser/sync/glue/bridged_invalidator_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -181 lines 0 comments Download
D chrome/browser/sync/glue/chrome_sync_notification_bridge.h View 2 1 chunk +0 lines, -74 lines 0 comments Download
D chrome/browser/sync/glue/chrome_sync_notification_bridge.cc View 2 1 chunk +0 lines, -218 lines 0 comments Download
D chrome/browser/sync/glue/chrome_sync_notification_bridge_unittest.cc View 1 1 chunk +0 lines, -227 lines 0 comments Download
M chrome/browser/sync/glue/sync_backend_host.h View 1 2 3 4 5 6 7 8 9 7 chunks +17 lines, -7 lines 0 comments Download
M chrome/browser/sync/glue/sync_backend_host.cc View 1 2 3 4 5 6 7 8 9 18 chunks +54 lines, -34 lines 0 comments Download
M chrome/browser/sync/glue/sync_backend_host_unittest.cc View 1 2 3 4 5 6 7 8 9 3 chunks +56 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 3 chunks +4 lines, -4 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M sync/internal_api/public/sync_manager.h View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
M sync/internal_api/public/test/fake_sync_manager.h View 1 2 3 4 5 6 7 8 9 3 chunks +7 lines, -0 lines 0 comments Download
M sync/internal_api/sync_manager_impl.h View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
M sync/internal_api/sync_manager_impl.cc View 1 2 3 4 5 6 7 8 9 3 chunks +36 lines, -10 lines 0 comments Download
M sync/internal_api/test/fake_sync_manager.cc View 1 2 3 4 5 6 7 8 9 2 chunks +8 lines, -0 lines 0 comments Download
M sync/notifier/invalidator_factory.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 13 (0 generated)
rlarocque
Hi Everyone, Here's an attempt at crbug.com/124137. Most of what I'm planning is described in ...
7 years, 11 months ago (2013-01-19 02:17:32 UTC) #1
rlarocque
Sounds like there are no objections. I've cleaned up the patch, added android support (with ...
7 years, 11 months ago (2013-01-23 20:32:45 UTC) #2
rlarocque
Looks like the tests are OK. Nicolas, could you review this change? Tommy: Please take ...
7 years, 11 months ago (2013-01-24 01:52:22 UTC) #3
Nicolas Zea
On 2013/01/24 01:52:22, rlarocque wrote: > Looks like the tests are OK. > > Nicolas, ...
7 years, 11 months ago (2013-01-25 02:08:09 UTC) #4
rlarocque
On 2013/01/25 02:08:09, Nicolas Zea wrote: > On 2013/01/24 01:52:22, rlarocque wrote: > > Looks ...
7 years, 11 months ago (2013-01-25 23:42:58 UTC) #5
Nicolas Zea
Would it be better to not have a proxy, and instead just have the SyncManager ...
7 years, 10 months ago (2013-01-28 23:48:43 UTC) #6
rlarocque
On 2013/01/28 23:48:43, Nicolas Zea wrote: > Would it be better to not have a ...
7 years, 10 months ago (2013-01-29 18:48:29 UTC) #7
rlarocque
Patch updated. https://codereview.chromium.org/12022041/diff/25001/chrome/browser/sync/glue/sync_backend_host.cc File chrome/browser/sync/glue/sync_backend_host.cc (right): https://codereview.chromium.org/12022041/diff/25001/chrome/browser/sync/glue/sync_backend_host.cc#newcode177 chrome/browser/sync/glue/sync_backend_host.cc:177: // Ask the syncer check for updates ...
7 years, 10 months ago (2013-01-29 18:48:58 UTC) #8
Nicolas Zea
I think I'm a bit confused then. Doesn't this code hit the same threading issues ...
7 years, 10 months ago (2013-01-30 00:04:11 UTC) #9
rlarocque
On 2013/01/30 00:04:11, Nicolas Zea wrote: > I think I'm a bit confused then. Doesn't ...
7 years, 10 months ago (2013-01-30 00:16:30 UTC) #10
Nicolas Zea
LGTM https://codereview.chromium.org/12022041/diff/32002/chrome/browser/sync/glue/android_invalidator_bridge.cc File chrome/browser/sync/glue/android_invalidator_bridge.cc (right): https://codereview.chromium.org/12022041/diff/32002/chrome/browser/sync/glue/android_invalidator_bridge.cc#newcode204 chrome/browser/sync/glue/android_invalidator_bridge.cc:204: = syncer::REMOTE_INVALIDATION; move '=' onto end of previous ...
7 years, 10 months ago (2013-01-30 00:50:50 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/12022041/24024
7 years, 10 months ago (2013-01-30 01:33:12 UTC) #12
commit-bot: I haz the power
7 years, 10 months ago (2013-01-30 06:25:05 UTC) #13
Message was sent while issue was closed.
Change committed as 179546

Powered by Google App Engine
This is Rietveld 408576698