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

Unified Diff: components/sync/driver/fake_sync_client.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/fake_sync_client.h ('k') | components/sync/driver/generic_change_processor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/driver/fake_sync_client.cc
diff --git a/components/sync/driver/fake_sync_client.cc b/components/sync/driver/fake_sync_client.cc
index 8346be67677572e316b8da62aaebb8c8f1eca040..d33b56ae5a80c3eb9677f6b28a088ea0083f8705 100644
--- a/components/sync/driver/fake_sync_client.cc
+++ b/components/sync/driver/fake_sync_client.cc
@@ -6,18 +6,25 @@
#include "base/bind.h"
#include "base/memory/ptr_util.h"
+#include "base/memory/weak_ptr.h"
#include "components/sync/base/extensions_activity.h"
#include "components/sync/base/sync_prefs.h"
#include "components/sync/driver/fake_sync_service.h"
namespace syncer {
+using ServiceProvider = SyncClient::ServiceProvider;
+
namespace {
void DummyRegisterPlatformTypesCallback(SyncService* sync_service,
ModelTypeSet,
ModelTypeSet) {}
+base::WeakPtr<SyncableService> EmptyWeakPtr() {
+ return base::WeakPtr<SyncableService>();
+}
+
} // namespace
FakeSyncClient::FakeSyncClient()
@@ -101,9 +108,8 @@ sync_sessions::SyncSessionsClient* FakeSyncClient::GetSyncSessionsClient() {
return nullptr;
}
-base::WeakPtr<SyncableService> FakeSyncClient::GetSyncableServiceForType(
- ModelType type) {
- return base::WeakPtr<SyncableService>();
+ServiceProvider FakeSyncClient::GetSyncableServiceForType(ModelType type) {
+ return base::Bind(&EmptyWeakPtr);
}
base::WeakPtr<ModelTypeSyncBridge> FakeSyncClient::GetSyncBridgeForModelType(
« no previous file with comments | « components/sync/driver/fake_sync_client.h ('k') | components/sync/driver/generic_change_processor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698