diff options
author | rlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-07 20:30:34 +0000 |
---|---|---|
committer | rlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-07 20:30:34 +0000 |
commit | c77435705b8f6a9173cdecc5e6eeb2f1911cc48a (patch) | |
tree | 8d1113110fed798c28e18124c68440baeaeed88d /sync/internal_api/test | |
parent | e5af9bcbb29f9207de974e278e614ebc0609ea08 (diff) | |
download | chromium_src-c77435705b8f6a9173cdecc5e6eeb2f1911cc48a.zip chromium_src-c77435705b8f6a9173cdecc5e6eeb2f1911cc48a.tar.gz chromium_src-c77435705b8f6a9173cdecc5e6eeb2f1911cc48a.tar.bz2 |
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
Review URL: https://codereview.chromium.org/224563004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262193 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/internal_api/test')
-rw-r--r-- | sync/internal_api/test/fake_sync_manager.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sync/internal_api/test/fake_sync_manager.cc b/sync/internal_api/test/fake_sync_manager.cc index c7dd249..9f1abb8 100644 --- a/sync/internal_api/test/fake_sync_manager.cc +++ b/sync/internal_api/test/fake_sync_manager.cc @@ -244,6 +244,11 @@ FakeSyncManager::GetBufferedProtocolEvents() { return ScopedVector<syncer::ProtocolEvent>(); } +scoped_ptr<base::ListValue> FakeSyncManager::GetAllNodesForType( + syncer::ModelType type) { + return scoped_ptr<base::ListValue>(new base::ListValue()); +} + void FakeSyncManager::RefreshTypes(ModelTypeSet types) { last_refresh_request_types_ = types; } |