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

Unified Diff: components/sync/driver/shared_change_processor_unittest.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
« 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 b64940493dd685f903af202abd88183f28947ac6..410b8dc8f97a00d5fd94576f879ee2e2335d0a65 100644
--- a/components/sync/driver/shared_change_processor_unittest.cc
+++ b/components/sync/driver/shared_change_processor_unittest.cc
@@ -91,9 +91,9 @@ class SyncSharedChangeProcessorTest : public testing::Test,
}
// FakeSyncClient override.
- base::WeakPtr<SyncableService> GetSyncableServiceForType(
- ModelType type) override {
- return db_syncable_service_->AsWeakPtr();
+ ServiceProvider GetSyncableServiceForType(ModelType type) override {
+ return base::Bind(&SyncableService::AsWeakPtr,
+ base::Unretained(db_syncable_service_.get()));
}
protected:
@@ -185,7 +185,8 @@ class SyncSharedChangeProcessorTest : public testing::Test,
const scoped_refptr<SharedChangeProcessor>& shared_change_processor) {
DCHECK(model_thread_.task_runner()->BelongsToCurrentThread());
EXPECT_TRUE(shared_change_processor->Connect(
- this, &processor_factory_, test_user_share_.user_share(),
+ GetSyncableServiceForType(AUTOFILL), &factory_, &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