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

Unified Diff: components/sync/driver/glue/sync_backend_host_core.cc

Issue 2276943006: [USS] Move GetAllNodes from backend to controller (Closed)
Patch Set: update for Max Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/sync/driver/glue/sync_backend_host_core.cc
diff --git a/components/sync/driver/glue/sync_backend_host_core.cc b/components/sync/driver/glue/sync_backend_host_core.cc
index 184c2afe3b1bbda9fa6b69b3a4bda615638f0b08..6bf962a14e09b3ff6231476bc48b148181364e20 100644
--- a/components/sync/driver/glue/sync_backend_host_core.cc
+++ b/components/sync/driver/glue/sync_backend_host_core.cc
@@ -662,32 +662,6 @@ void SyncBackendHostCore::DeleteSyncDataFolder() {
}
}
-void SyncBackendHostCore::GetAllNodesForTypes(
- syncer::ModelTypeSet types,
- scoped_refptr<base::SequencedTaskRunner> task_runner,
- base::Callback<void(const std::vector<syncer::ModelType>& type,
- std::vector<std::unique_ptr<base::ListValue>>)>
- callback) {
- std::vector<syncer::ModelType> types_vector;
- std::vector<std::unique_ptr<base::ListValue>> node_lists;
-
- syncer::ModelSafeRoutingInfo routes;
- registrar_->GetModelSafeRoutingInfo(&routes);
- syncer::ModelTypeSet enabled_types = GetRoutingInfoTypes(routes);
-
- for (syncer::ModelTypeSet::Iterator it = types.First(); it.Good(); it.Inc()) {
- types_vector.push_back(it.Get());
- if (!enabled_types.Has(it.Get())) {
- node_lists.push_back(base::MakeUnique<base::ListValue>());
- } else {
- node_lists.push_back(sync_manager_->GetAllNodesForType(it.Get()));
- }
- }
-
- task_runner->PostTask(
- FROM_HERE, base::Bind(callback, types_vector, base::Passed(&node_lists)));
-}
-
void SyncBackendHostCore::StartSavingChanges() {
// We may already be shut down.
if (!sync_loop_)
« no previous file with comments | « components/sync/driver/glue/sync_backend_host_core.h ('k') | components/sync/driver/glue/sync_backend_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698