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

Issue 134443004: sync: Remove some WebUI debug functions (Closed)

Created:
6 years, 11 months ago by rlarocque
Modified:
6 years, 11 months ago
Reviewers:
Nicolas Zea, Evan Stade
CC:
chromium-reviews, tim+watch_chromium.org, rsimha+watch_chromium.org, haitaol+watch_chromium.org, arv+watch_chromium.org, maniscalco+watch_chromium.org
Visibility:
Public.

Description

sync: Remove some WebUI debug functions This CL removes a number of functions from the sync debugging framework in order to prepare for some upcoming changes to sync debugging (due to 328606). This CL removes the following functions: - GetRootNodeDetails - GetNodeSummaries - GetNodeDetails - GetChildNodeIds It also adds the function 'getListOfKnownTypes' to help replace some old functionality required by the 'data' tab and to fix issue 329013. Rather than having that tab fetch a list of children of the root node, it now asks for a list of all known data types. This is a better solution, since it does not require sync to be fully initialized in order to properly populate the set of checkboxes. The most significant user of the removed functionality is the node browser. Its javascript code has been modified in order to transition it to relying on the getAllNodes function. Rather than fetching node data on demand by a series of asynchronous callbacks, the tab now fetches a list of all known sync nodes at once. This has the advantage of providing a more consistent (though more stale) snapshot. This CL adds a refresh button to the node browser tab in order to give users some control over its staleness. This change had some minor side-effects. The node browser now relies on items' string-based IDs rather than their metahandles when determining the nodes' hierarchy. We've also had to add a 'positionIndex' field to the output of getAllNodes to make it easier for the node browser to sort its entries. In part to make it easier to fetch this field, most of the code associated with getAllNodes has been moved into the syncable::Directory. In addition to all these changes, this CL adds some webui tests to help prevent regressions in about:sync functionality. For now, they only cover the node browser. More tests will be added in future CLs. BUG=110517, 329013, 328606 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=245313

Patch Set 1 #

Patch Set 2 : Remove unused variable #

Patch Set 3 : Minor cleanups #

Total comments: 12

Patch Set 4 : Address some comments #

Total comments: 6

Patch Set 5 : Fix function signatures #

Patch Set 6 : Fix function signatures #

Patch Set 7 : Add link to bug in comments #

Patch Set 8 : Add comment to sort function #

Patch Set 9 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+438 lines, -796 lines) Patch
M build/ios/grit_whitelist.txt View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/resources/sync_internals/chrome_sync.js View 1 2 3 1 chunk +4 lines, -6 lines 0 comments Download
M chrome/browser/resources/sync_internals/data.js View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -12 lines 0 comments Download
M chrome/browser/resources/sync_internals/node_browser.html View 1 2 3 1 chunk +45 lines, -51 lines 0 comments Download
M chrome/browser/resources/sync_internals/node_browser.js View 1 2 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/browser/resources/sync_internals/sync_node_browser.css View 1 2 3 3 chunks +15 lines, -8 lines 0 comments Download
M chrome/browser/resources/sync_internals/sync_node_browser.js View 1 2 3 4 5 6 7 3 chunks +141 lines, -113 lines 0 comments Download
M chrome/browser/resources/sync_internals_resources.grd View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/sync_internals_browsertest.js View 3 chunks +165 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/sync_internals_message_handler.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/webui/sync_internals_message_handler.cc View 1 2 3 4 5 6 3 chunks +21 lines, -5 lines 0 comments Download
M chrome/browser/ui/webui/sync_internals_ui.cc View 1 chunk +0 lines, -2 lines 0 comments Download
M sync/internal_api/base_node.cc View 2 chunks +2 lines, -31 lines 0 comments Download
M sync/internal_api/public/base_node.h View 1 chunk +2 lines, -7 lines 0 comments Download
M sync/internal_api/public/sync_manager.h View 1 2 3 4 5 6 1 chunk +0 lines, -41 lines 0 comments Download
M sync/internal_api/sync_manager_impl.h View 1 2 3 4 5 6 1 chunk +0 lines, -1 line 0 comments Download
M sync/internal_api/sync_manager_impl.cc View 1 2 3 4 5 6 3 chunks +3 lines, -103 lines 0 comments Download
M sync/internal_api/sync_manager_impl_unittest.cc View 1 2 3 4 5 6 4 chunks +8 lines, -339 lines 0 comments Download
M sync/js/js_test_util.h View 1 chunk +0 lines, -4 lines 0 comments Download
M sync/js/js_test_util.cc View 1 chunk +0 lines, -6 lines 0 comments Download
M sync/syncable/directory.h View 4 chunks +3 lines, -10 lines 0 comments Download
M sync/syncable/directory.cc View 3 chunks +24 lines, -28 lines 0 comments Download
M sync/syncable/syncable_unittest.cc View 1 3 chunks +0 lines, -19 lines 0 comments Download
M sync/tools/sync_client.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 12 (0 generated)
rlarocque
I'm still iterating against the trybots, but most of this patch is now stable. Please ...
6 years, 11 months ago (2014-01-10 21:46:34 UTC) #1
Nicolas Zea
https://codereview.chromium.org/134443004/diff/80001/chrome/browser/resources/sync_internals/chrome_sync.js File chrome/browser/resources/sync_internals/chrome_sync.js (right): https://codereview.chromium.org/134443004/diff/80001/chrome/browser/resources/sync_internals/chrome_sync.js#newcode150 chrome/browser/resources/sync_internals/chrome_sync.js:150: 'getListOfKnownTypes', Why not just name this getListOfTypes? "known" is ...
6 years, 11 months ago (2014-01-13 20:10:14 UTC) #2
rlarocque
Some comments addressed. PTAL. https://codereview.chromium.org/134443004/diff/80001/chrome/browser/resources/sync_internals/chrome_sync.js File chrome/browser/resources/sync_internals/chrome_sync.js (right): https://codereview.chromium.org/134443004/diff/80001/chrome/browser/resources/sync_internals/chrome_sync.js#newcode150 chrome/browser/resources/sync_internals/chrome_sync.js:150: 'getListOfKnownTypes', On 2014/01/13 20:10:14, Nicolas ...
6 years, 11 months ago (2014-01-13 21:56:17 UTC) #3
rlarocque
+sky for OWNERS stamp and more reviewing. sky: Please review changes in - chrome/browser/resources/sync_internals_resources.grd - ...
6 years, 11 months ago (2014-01-14 01:06:45 UTC) #4
sky
estade is a better reviewer for webui changes, so: +estade -sky
6 years, 11 months ago (2014-01-14 01:42:35 UTC) #5
Evan Stade
lgtm modulo nits https://codereview.chromium.org/134443004/diff/190001/chrome/browser/ui/webui/sync_internals_message_handler.cc File chrome/browser/ui/webui/sync_internals_message_handler.cc (right): https://codereview.chromium.org/134443004/diff/190001/chrome/browser/ui/webui/sync_internals_message_handler.cc#newcode50 chrome/browser/ui/webui/sync_internals_message_handler.cc:50: base::Bind(&SyncInternalsMessageHandler::OnGetListOfKnownTypes, nit: please make message string ...
6 years, 11 months ago (2014-01-14 17:32:56 UTC) #6
rlarocque
Patch updated. Nicolas: PTAL. https://codereview.chromium.org/134443004/diff/190001/chrome/browser/ui/webui/sync_internals_message_handler.cc File chrome/browser/ui/webui/sync_internals_message_handler.cc (right): https://codereview.chromium.org/134443004/diff/190001/chrome/browser/ui/webui/sync_internals_message_handler.cc#newcode50 chrome/browser/ui/webui/sync_internals_message_handler.cc:50: base::Bind(&SyncInternalsMessageHandler::OnGetListOfKnownTypes, On 2014/01/14 17:32:57, Evan ...
6 years, 11 months ago (2014-01-14 20:59:38 UTC) #7
Evan Stade
https://codereview.chromium.org/134443004/diff/190001/chrome/browser/ui/webui/sync_internals_message_handler.cc File chrome/browser/ui/webui/sync_internals_message_handler.cc (right): https://codereview.chromium.org/134443004/diff/190001/chrome/browser/ui/webui/sync_internals_message_handler.cc#newcode70 chrome/browser/ui/webui/sync_internals_message_handler.cc:70: // TODO(rlarocque): We should DCHECK(!args) here. On 2014/01/14 20:59:39, ...
6 years, 11 months ago (2014-01-14 22:07:52 UTC) #8
Nicolas Zea
lgtm https://codereview.chromium.org/134443004/diff/80001/chrome/browser/resources/sync_internals/sync_node_browser.js File chrome/browser/resources/sync_internals/sync_node_browser.js (right): https://codereview.chromium.org/134443004/diff/80001/chrome/browser/resources/sync_internals/sync_node_browser.js#newcode33 chrome/browser/resources/sync_internals/sync_node_browser.js:33: * finally sorting by METAHANDLE On 2014/01/13 21:56:17, ...
6 years, 11 months ago (2014-01-14 22:14:32 UTC) #9
rlarocque
Thanks for the review. I won't try to land this right away. It's possible that ...
6 years, 11 months ago (2014-01-14 22:20:43 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/134443004/350001
6 years, 11 months ago (2014-01-16 18:38:38 UTC) #11
commit-bot: I haz the power
6 years, 11 months ago (2014-01-16 20:59:05 UTC) #12
Message was sent while issue was closed.
Change committed as 245313

Powered by Google App Engine
This is Rietveld 408576698