• rlarocque@chromium.org's avatar
    sync: Remove some WebUI debug functions · 34da86a6
    rlarocque@chromium.org authored
    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
    
    Review URL: https://codereview.chromium.org/134443004
    
    git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245313 0039d316-1c4b-4281-b951-d872f2087c98
    34da86a6
directory.cc 43.6 KB