Index: components/sync/driver/async_directory_type_controller.cc |
diff --git a/components/sync/driver/async_directory_type_controller.cc b/components/sync/driver/async_directory_type_controller.cc |
index a821b212f5d98779bc6b7af45e2e2c1af10f149b..20303855fc91bf4fab7b86467aadfbd2c210e72e 100644 |
--- a/components/sync/driver/async_directory_type_controller.cc |
+++ b/components/sync/driver/async_directory_type_controller.cc |
@@ -228,12 +228,17 @@ bool AsyncDirectoryTypeController::StartAssociationAsync() { |
DCHECK_EQ(state(), ASSOCIATING); |
return PostTaskOnModelThread( |
FROM_HERE, |
+ // TODO(skym): Sending a non-owning SyncApiComponentFactory pointer across |
+ // threads is less than ideal. Likely safe because of the locking and |
+ // disconnect flag in SharedChangeProcessor. This object is only ever used |
+ // for dead attachments code anyways. |
base::Bind( |
&SharedChangeProcessor::StartAssociation, shared_change_processor_, |
BindToCurrentThread(base::Bind( |
&AsyncDirectoryTypeController::StartDone, base::AsWeakPtr(this))), |
- sync_client_, processor_factory_.get(), user_share_, |
- base::Passed(CreateErrorHandler()))); |
+ sync_client_->GetSyncableServiceForType(type()), |
+ sync_client_->GetSyncApiComponentFactory(), processor_factory_.get(), |
+ user_share_, base::Passed(CreateErrorHandler()))); |
} |
ChangeProcessor* AsyncDirectoryTypeController::GetChangeProcessor() const { |