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

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

Issue 2799653006: Revert of [Sync] Stop accessing BrowserContextKeyedServiceFactory on non-UI thread. (Closed)
Patch Set: Created 3 years, 8 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/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 20303855fc91bf4fab7b86467aadfbd2c210e72e..a821b212f5d98779bc6b7af45e2e2c1af10f149b 100644
--- a/components/sync/driver/async_directory_type_controller.cc
+++ b/components/sync/driver/async_directory_type_controller.cc
@@ -228,17 +228,12 @@
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_->GetSyncableServiceForType(type()),
- sync_client_->GetSyncApiComponentFactory(), processor_factory_.get(),
- user_share_, base::Passed(CreateErrorHandler())));
+ sync_client_, processor_factory_.get(), user_share_,
+ base::Passed(CreateErrorHandler())));
}
ChangeProcessor* AsyncDirectoryTypeController::GetChangeProcessor() const {

Powered by Google App Engine
This is Rietveld 408576698