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

Unified Diff: components/sync/driver/non_blocking_data_type_controller.cc

Issue 2319973003: [USS] Implement SharedModelTypeProcessor::GetAllNodes for USS (Closed)
Patch Set: add comments Created 4 years, 3 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/non_blocking_data_type_controller.cc
diff --git a/components/sync/driver/non_blocking_data_type_controller.cc b/components/sync/driver/non_blocking_data_type_controller.cc
index 9cbf62ba74572151965194094227e54ec0f49cf0..0511c3d3c7d6832df1985a333a20313b9216c1e9 100644
--- a/components/sync/driver/non_blocking_data_type_controller.cc
+++ b/components/sync/driver/non_blocking_data_type_controller.cc
@@ -79,7 +79,14 @@ void NonBlockingDataTypeController::LoadModels(
void NonBlockingDataTypeController::GetAllNodes(
const AllNodesCallback& callback) {
- callback.Run(type(), base::WrapUnique(new base::ListValue()));
+ base::WeakPtr<syncer_v2::ModelTypeService> service =
+ sync_client_->GetModelTypeServiceForType(type());
+ syncer_v2::SharedModelTypeProcessor* processor =
+ (syncer_v2::SharedModelTypeProcessor*)service->change_processor();
skym 2016/09/12 16:40:39 This cast should have a TODO
Gang Wu 2016/09/12 22:38:04 Done.
+ RunOnModelThread(FROM_HERE,
+ base::Bind(&syncer_v2::SharedModelTypeProcessor::GetAllNodes,
+ base::Unretained(processor),
+ base::ThreadTaskRunnerHandle::Get(), callback));
}
void NonBlockingDataTypeController::LoadModelsDone(

Powered by Google App Engine
This is Rietveld 408576698