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

Issue 212603007: sync: Buffer Protocol Events for about:sync page (Closed)

Created:
6 years, 9 months ago by rlarocque
Modified:
6 years, 8 months ago
CC:
chromium-reviews, tim+watch_chromium.org, haitaol+watch_chromium.org, arv+watch_chromium.org, maniscalco+watch_chromium.org
Visibility:
Public.

Description

sync: Buffer Protocol Events for about:sync page Allows the about:sync page to present the last six network events as soon as it's opened. Adds the ProtocolEventBuffer to the SyncManagerImpl. This class holds on to a few protocol events and returns them on demand. Modifies the interface to enable SyncBacknedHost protocol event forwarding. By default, it does not forward any events. There are now separate registration and unregistration functions. The registration function will send the set of buffered notifications to the UI thread, and also register it to receive incoming events in the future. It continues to forward events until the number of registration calls is matched by the number of un-registration calls. Makes about:sync's registration to receive events explicit. This was a long-time TODO. If we did not fix this issue, then the about:sync page could receive the initial set of buffered invalidations before it had its event listeners defined and registered. Makes the about:sync page keep track of known events and avoid adding duplicates to the list. Since the registration of a new event listener causes events to be distributed to all listeners, we must add this logic to ensure that opening one new about:sync tab will not cause previously opened tabs to display duplicate events. BUG=329373, 349301 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=260726

Patch Set 1 #

Total comments: 6

Patch Set 2 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+352 lines, -51 lines) Patch
M chrome/browser/resources/sync_internals/about.js View 3 chunks +42 lines, -20 lines 0 comments Download
M chrome/browser/resources/sync_internals/chrome_sync.js View 2 chunks +9 lines, -0 lines 0 comments Download
M chrome/browser/sync/glue/sync_backend_host.h View 1 chunk +8 lines, -2 lines 0 comments Download
M chrome/browser/sync/glue/sync_backend_host_core.h View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/sync/glue/sync_backend_host_core.cc View 2 chunks +24 lines, -2 lines 0 comments Download
M chrome/browser/sync/glue/sync_backend_host_impl.h View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/sync/glue/sync_backend_host_impl.cc View 1 chunk +13 lines, -3 lines 0 comments Download
M chrome/browser/sync/glue/sync_backend_host_mock.h View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/sync/glue/sync_backend_host_mock.cc View 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/sync/profile_sync_service.cc View 1 2 chunks +4 lines, -6 lines 0 comments Download
M chrome/browser/ui/webui/sync_internals_browsertest.js View 2 chunks +30 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/sync_internals_message_handler.h View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/sync_internals_message_handler.cc View 2 chunks +17 lines, -8 lines 0 comments Download
A sync/internal_api/protocol_event_buffer.h View 1 chunk +42 lines, -0 lines 0 comments Download
A sync/internal_api/protocol_event_buffer.cc View 1 chunk +37 lines, -0 lines 0 comments Download
A sync/internal_api/protocol_event_buffer_unittest.cc View 1 chunk +77 lines, -0 lines 0 comments Download
M sync/internal_api/public/events/commit_request_event.h View 2 chunks +2 lines, -1 line 0 comments Download
M sync/internal_api/public/events/commit_response_event.h View 2 chunks +2 lines, -1 line 0 comments Download
M sync/internal_api/public/events/configure_get_updates_request_event.h View 1 chunk +3 lines, -1 line 0 comments Download
M sync/internal_api/public/events/get_updates_response_event.h View 2 chunks +2 lines, -1 line 0 comments Download
M sync/internal_api/public/events/normal_get_updates_request_event.h View 2 chunks +2 lines, -1 line 0 comments Download
M sync/internal_api/public/events/poll_get_updates_request_event.h View 2 chunks +2 lines, -1 line 0 comments Download
M sync/internal_api/public/sync_manager.h View 1 2 chunks +4 lines, -0 lines 0 comments Download
M sync/internal_api/public/test/fake_sync_manager.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M sync/internal_api/sync_manager_impl.h View 1 3 chunks +4 lines, -0 lines 0 comments Download
M sync/internal_api/sync_manager_impl.cc View 1 2 chunks +6 lines, -0 lines 0 comments Download
M sync/internal_api/test/fake_sync_manager.cc View 1 1 chunk +5 lines, -0 lines 0 comments Download
M sync/sync_internal_api.gypi View 1 1 chunk +2 lines, -0 lines 0 comments Download
M sync/sync_tests.gypi View 1 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
rlarocque
Here's the next step after https://codereview.chromium.org/210233005/. To be honest, I'm not very enthusiastic about this ...
6 years, 9 months ago (2014-03-27 00:05:35 UTC) #1
rlarocque
Almost forgot: jhawkins: Please review chrome/browser/resources/ and chrome/browser/ui/webui/. timsteele: Please review the rest.
6 years, 9 months ago (2014-03-27 00:11:36 UTC) #2
James Hawkins
https://codereview.chromium.org/212603007/diff/1/chrome/browser/resources/sync_internals/about.js File chrome/browser/resources/sync_internals/about.js (right): https://codereview.chromium.org/212603007/diff/1/chrome/browser/resources/sync_internals/about.js#newcode22 chrome/browser/resources/sync_internals/about.js:22: /** We may receive re-delivered events. Keep a record ...
6 years, 9 months ago (2014-03-27 21:01:25 UTC) #3
James Hawkins
6 years, 9 months ago (2014-03-27 21:01:25 UTC) #4
rlarocque
https://codereview.chromium.org/212603007/diff/1/chrome/browser/resources/sync_internals/about.js File chrome/browser/resources/sync_internals/about.js (right): https://codereview.chromium.org/212603007/diff/1/chrome/browser/resources/sync_internals/about.js#newcode22 chrome/browser/resources/sync_internals/about.js:22: /** We may receive re-delivered events. Keep a record ...
6 years, 9 months ago (2014-03-27 21:19:54 UTC) #5
James Hawkins
LGTM
6 years, 9 months ago (2014-03-27 21:21:44 UTC) #6
rlarocque
Tim: ping.
6 years, 9 months ago (2014-03-28 18:12:44 UTC) #7
tim (not reviewing)
It seems like there's a lot of overlap with TrafficRecorder. Is there any way you ...
6 years, 9 months ago (2014-03-28 20:45:42 UTC) #8
rlarocque
On 2014/03/28 20:45:42, timsteele wrote: > It seems like there's a lot of overlap with ...
6 years, 9 months ago (2014-03-28 21:00:34 UTC) #9
rlarocque
https://codereview.chromium.org/212603007/diff/1/sync/internal_api/protocol_event_buffer.h File sync/internal_api/protocol_event_buffer.h (right): https://codereview.chromium.org/212603007/diff/1/sync/internal_api/protocol_event_buffer.h#newcode22 sync/internal_api/protocol_event_buffer.h:22: static const size_t kBufferSize; On 2014/03/28 20:45:42, timsteele wrote: ...
6 years, 9 months ago (2014-03-28 21:00:48 UTC) #10
tim (not reviewing)
On 2014/03/28 21:00:34, rlarocque wrote: > On 2014/03/28 20:45:42, timsteele wrote: > > It seems ...
6 years, 9 months ago (2014-03-28 21:30:08 UTC) #11
rlarocque
The CQ bit was checked by rlarocque@chromium.org
6 years, 9 months ago (2014-03-28 21:38:55 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/212603007/1
6 years, 9 months ago (2014-03-28 21:42:25 UTC) #13
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-28 21:42:37 UTC) #14
commit-bot: I haz the power
Failed to apply patch for sync/sync_internal_api.gypi: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 9 months ago (2014-03-28 21:42:38 UTC) #15
rlarocque
The CQ bit was checked by rlarocque@chromium.org
6 years, 8 months ago (2014-03-31 21:36:52 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/212603007/20001
6 years, 8 months ago (2014-03-31 21:37:50 UTC) #17
commit-bot: I haz the power
6 years, 8 months ago (2014-04-01 01:20:16 UTC) #18
Message was sent while issue was closed.
Change committed as 260726

Powered by Google App Engine
This is Rietveld 408576698