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

Issue 224563004: sync: Re-implement getAllNodes WebUI function (Closed)

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

Description

sync: Re-implement getAllNodes WebUI function Removes the existing implementation of getAllNodes. This was the last function based on the old "makeSyncFunction" and "JsMessageHandler" interface, so its removal leaves behind quite a bit of dead code. This CL removes some of it. The rest will be removed in a future CL. Replaces it with some infrastructure intended to be more compatible with the future of sync, where each type is more independent. Requests to getAllNodes are routed through a DirectoryTypeDebugInfoEmitter in the ModelTypeRegistry. A NonBlockingTypeDebugInfoEmitter will be implemented in a future CL. The new system also intended to support "streaming" results. Rather than waiting for all types to return their nodes, the system could be modified to allow some types to get back to the JavaScript layer sooner than others so it can display results earlier. However, we do not currently take advantage of this functionality. The return type of getAllNodes is now an array of per-type objects, rather than one big list of nodes. This, too, should help us implement streaming support in the future. For now, most of the JavaScript callbacks will convert the data back to the old format before operating on it. BUG=328606 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=262193

Patch Set 1 #

Patch Set 2 : Style fixes + comments #

Total comments: 56

Patch Set 3 : Many updates #

Total comments: 12

Patch Set 4 : Sytle and comment fixes #

Patch Set 5 : Comment fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+528 lines, -311 lines) Patch
M chrome/browser/resources/sync_internals/chrome_sync.js View 1 2 3 2 chunks +37 lines, -35 lines 0 comments Download
M chrome/browser/resources/sync_internals/data.js View 1 2 4 chunks +26 lines, -12 lines 0 comments Download
M chrome/browser/resources/sync_internals/sync_node_browser.js View 1 2 3 1 chunk +6 lines, -1 line 0 comments Download
M chrome/browser/resources/sync_internals/sync_search.js View 1 2 3 1 chunk +7 lines, -2 lines 0 comments Download
M chrome/browser/sync/glue/sync_backend_host.h View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/browser/sync/glue/sync_backend_host_core.h View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/sync/glue/sync_backend_host_core.cc View 1 2 1 chunk +27 lines, -0 lines 0 comments Download
M chrome/browser/sync/glue/sync_backend_host_impl.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/sync/glue/sync_backend_host_impl.cc View 1 2 1 chunk +14 lines, -0 lines 0 comments Download
M chrome/browser/sync/glue/sync_backend_host_mock.h View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/sync/glue/sync_backend_host_mock.cc View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/sync/profile_sync_service.h View 1 2 1 chunk +9 lines, -0 lines 0 comments Download
M chrome/browser/sync/profile_sync_service.cc View 1 2 2 chunks +98 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/sync_internals_browsertest.js View 1 2 3 3 chunks +106 lines, -114 lines 0 comments Download
M chrome/browser/ui/webui/sync_internals_message_handler.h View 1 2 3 5 chunks +5 lines, -12 lines 0 comments Download
M chrome/browser/ui/webui/sync_internals_message_handler.cc View 1 2 5 chunks +28 lines, -35 lines 0 comments Download
A sync/engine/directory_type_debug_info_emitter.h View 1 2 3 4 1 chunk +34 lines, -0 lines 0 comments Download
A sync/engine/directory_type_debug_info_emitter.cc View 1 1 chunk +26 lines, -0 lines 0 comments Download
M sync/internal_api/public/sync_manager.h View 1 chunk +3 lines, -0 lines 0 comments Download
M sync/internal_api/public/test/fake_sync_manager.h View 1 chunk +2 lines, -0 lines 0 comments Download
M sync/internal_api/sync_manager_impl.h View 4 chunks +2 lines, -15 lines 0 comments Download
M sync/internal_api/sync_manager_impl.cc View 4 chunks +15 lines, -40 lines 0 comments Download
M sync/internal_api/sync_manager_impl_unittest.cc View 1 2 4 chunks +9 lines, -41 lines 0 comments Download
M sync/internal_api/test/fake_sync_manager.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M sync/sessions/model_type_registry.h View 4 chunks +12 lines, -0 lines 0 comments Download
M sync/sessions/model_type_registry.cc View 5 chunks +17 lines, -0 lines 0 comments Download
M sync/sync_core.gypi View 1 chunk +2 lines, -0 lines 0 comments Download
M sync/syncable/directory.h View 1 chunk +4 lines, -1 line 0 comments Download
M sync/syncable/directory.cc View 1 chunk +7 lines, -2 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
rlarocque
dbeam: Please review the files in chrome/browser/resources and chrome/browser/ui zea: Please review the rest.
6 years, 8 months ago (2014-04-04 20:50:31 UTC) #1
Dan Beam
https://codereview.chromium.org/224563004/diff/20001/chrome/browser/resources/sync_internals/chrome_sync.js File chrome/browser/resources/sync_internals/chrome_sync.js (right): https://codereview.chromium.org/224563004/diff/20001/chrome/browser/resources/sync_internals/chrome_sync.js#newcode71 chrome/browser/resources/sync_internals/chrome_sync.js:71: /** Doc comment of what these do and how ...
6 years, 8 months ago (2014-04-04 22:36:30 UTC) #2
Nicolas Zea
https://codereview.chromium.org/224563004/diff/20001/chrome/browser/sync/profile_sync_service.cc File chrome/browser/sync/profile_sync_service.cc (right): https://codereview.chromium.org/224563004/diff/20001/chrome/browser/sync/profile_sync_service.cc#newcode2088 chrome/browser/sync/profile_sync_service.cc:2088: base::Callback<void(scoped_ptr<base::ListValue>)> callback); pass callbacks by const ref, here and ...
6 years, 8 months ago (2014-04-04 23:01:27 UTC) #3
rlarocque
Patch updated. PTAL. https://codereview.chromium.org/224563004/diff/20001/chrome/browser/resources/sync_internals/chrome_sync.js File chrome/browser/resources/sync_internals/chrome_sync.js (right): https://codereview.chromium.org/224563004/diff/20001/chrome/browser/resources/sync_internals/chrome_sync.js#newcode71 chrome/browser/resources/sync_internals/chrome_sync.js:71: On 2014/04/04 22:36:31, Dan Beam wrote: ...
6 years, 8 months ago (2014-04-05 00:07:27 UTC) #4
Dan Beam
lgtm https://codereview.chromium.org/224563004/diff/20001/chrome/browser/resources/sync_internals/sync_node_browser.js File chrome/browser/resources/sync_internals/sync_node_browser.js (right): https://codereview.chromium.org/224563004/diff/20001/chrome/browser/resources/sync_internals/sync_node_browser.js#newcode173 chrome/browser/resources/sync_internals/sync_node_browser.js:173: * Fetch the latest set of nodes and ...
6 years, 8 months ago (2014-04-05 00:19:24 UTC) #5
rlarocque
Thanks for the review. https://codereview.chromium.org/224563004/diff/40001/chrome/browser/resources/sync_internals/chrome_sync.js File chrome/browser/resources/sync_internals/chrome_sync.js (right): https://codereview.chromium.org/224563004/diff/40001/chrome/browser/resources/sync_internals/chrome_sync.js#newcode80 chrome/browser/resources/sync_internals/chrome_sync.js:80: * Used in the implementation ...
6 years, 8 months ago (2014-04-05 00:27:29 UTC) #6
Nicolas Zea
LGTM https://codereview.chromium.org/224563004/diff/20001/chrome/browser/sync/profile_sync_service.cc File chrome/browser/sync/profile_sync_service.cc (right): https://codereview.chromium.org/224563004/diff/20001/chrome/browser/sync/profile_sync_service.cc#newcode2154 chrome/browser/sync/profile_sync_service.cc:2154: scoped_refptr<GetAllNodesRequestHelper> helper = On 2014/04/05 00:07:27, rlarocque wrote: ...
6 years, 8 months ago (2014-04-05 00:30:29 UTC) #7
rlarocque
https://codereview.chromium.org/224563004/diff/20001/chrome/browser/sync/profile_sync_service.cc File chrome/browser/sync/profile_sync_service.cc (right): https://codereview.chromium.org/224563004/diff/20001/chrome/browser/sync/profile_sync_service.cc#newcode2154 chrome/browser/sync/profile_sync_service.cc:2154: scoped_refptr<GetAllNodesRequestHelper> helper = On 2014/04/05 00:30:29, Nicolas Zea wrote: ...
6 years, 8 months ago (2014-04-05 00:42:05 UTC) #8
rlarocque
The CQ bit was checked by rlarocque@chromium.org
6 years, 8 months ago (2014-04-07 17:21:07 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/224563004/80001
6 years, 8 months ago (2014-04-07 17:21:25 UTC) #10
commit-bot: I haz the power
6 years, 8 months ago (2014-04-07 20:30:42 UTC) #11
Message was sent while issue was closed.
Change committed as 262193

Powered by Google App Engine
This is Rietveld 408576698