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

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

Issue 2769113002: [Sync] Stop accessing BrowserContextKeyedServiceFactory on non-UI thread. (Closed)
Patch Set: Rebase and removing dependent patch set. Created 3 years, 9 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/generic_change_processor.cc
diff --git a/components/sync/driver/generic_change_processor.cc b/components/sync/driver/generic_change_processor.cc
index 1dee59fda337dfbdee48bb11ed9df1a63826b28d..92244875a730ccf477bbcd088e7f54d62ca22154 100644
--- a/components/sync/driver/generic_change_processor.cc
+++ b/components/sync/driver/generic_change_processor.cc
@@ -16,7 +16,6 @@
#include "base/threading/sequenced_task_runner_handle.h"
#include "components/sync/base/unrecoverable_error_handler.h"
#include "components/sync/driver/sync_api_component_factory.h"
-#include "components/sync/driver/sync_client.h"
#include "components/sync/model/local_change_observer.h"
#include "components/sync/model/sync_change.h"
#include "components/sync/model/sync_error.h"
@@ -111,7 +110,7 @@ GenericChangeProcessor::GenericChangeProcessor(
const base::WeakPtr<SyncableService>& local_service,
const base::WeakPtr<SyncMergeResult>& merge_result,
UserShare* user_share,
- SyncClient* sync_client,
+ SyncApiComponentFactory* driver_factory,
std::unique_ptr<AttachmentStoreForSync> attachment_store)
: ChangeProcessor(std::move(error_handler)),
type_(type),
@@ -127,10 +126,8 @@ GenericChangeProcessor::GenericChangeProcessor(
ReadTransaction trans(FROM_HERE, share_handle());
store_birthday = trans.GetStoreBirthday();
}
- attachment_service_ =
- sync_client->GetSyncApiComponentFactory()->CreateAttachmentService(
- std::move(attachment_store), *user_share, store_birthday, type,
- this);
+ attachment_service_ = driver_factory->CreateAttachmentService(
+ std::move(attachment_store), *user_share, store_birthday, type, this);
attachment_service_weak_ptr_factory_ =
base::MakeUnique<base::WeakPtrFactory<AttachmentService>>(
attachment_service_.get());
« no previous file with comments | « components/sync/driver/generic_change_processor.h ('k') | components/sync/driver/generic_change_processor_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698