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

Unified Diff: components/sync/driver/shared_change_processor_unittest.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
« no previous file with comments | « components/sync/driver/shared_change_processor.cc ('k') | components/sync/driver/sync_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/driver/shared_change_processor_unittest.cc
diff --git a/components/sync/driver/shared_change_processor_unittest.cc b/components/sync/driver/shared_change_processor_unittest.cc
index 410b8dc8f97a00d5fd94576f879ee2e2335d0a65..b64940493dd685f903af202abd88183f28947ac6 100644
--- a/components/sync/driver/shared_change_processor_unittest.cc
+++ b/components/sync/driver/shared_change_processor_unittest.cc
@@ -91,9 +91,9 @@
}
// FakeSyncClient override.
- ServiceProvider GetSyncableServiceForType(ModelType type) override {
- return base::Bind(&SyncableService::AsWeakPtr,
- base::Unretained(db_syncable_service_.get()));
+ base::WeakPtr<SyncableService> GetSyncableServiceForType(
+ ModelType type) override {
+ return db_syncable_service_->AsWeakPtr();
}
protected:
@@ -185,8 +185,7 @@
const scoped_refptr<SharedChangeProcessor>& shared_change_processor) {
DCHECK(model_thread_.task_runner()->BelongsToCurrentThread());
EXPECT_TRUE(shared_change_processor->Connect(
- GetSyncableServiceForType(AUTOFILL), &factory_, &processor_factory_,
- test_user_share_.user_share(),
+ this, &processor_factory_, test_user_share_.user_share(),
base::MakeUnique<DataTypeErrorHandlerMock>(),
base::WeakPtr<SyncMergeResult>()));
did_connect_ = true;
« no previous file with comments | « components/sync/driver/shared_change_processor.cc ('k') | components/sync/driver/sync_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698