| Index: components/sync/driver/sync_client.h
|
| diff --git a/components/sync/driver/sync_client.h b/components/sync/driver/sync_client.h
|
| index ddf64d83d97675a279f0ec22c5b5b687b7e78974..c0030b4cc2a9d18614cc90ee9f38b55a019d4209 100644
|
| --- a/components/sync/driver/sync_client.h
|
| +++ b/components/sync/driver/sync_client.h
|
| @@ -59,6 +59,8 @@ class SyncableService;
|
| // to handle these scenarios gracefully.
|
| class SyncClient {
|
| public:
|
| + using ServiceProvider = base::Callback<base::WeakPtr<SyncableService>()>;
|
| +
|
| SyncClient();
|
| virtual ~SyncClient();
|
|
|
| @@ -100,11 +102,10 @@ class SyncClient {
|
| virtual scoped_refptr<ExtensionsActivity> GetExtensionsActivity() = 0;
|
| virtual sync_sessions::SyncSessionsClient* GetSyncSessionsClient() = 0;
|
|
|
| - // Returns a weak pointer to the syncable service specified by |type|.
|
| - // Weak pointer may be unset if service is already destroyed.
|
| - // Note: Should only be dereferenced from the model type thread.
|
| - virtual base::WeakPtr<SyncableService> GetSyncableServiceForType(
|
| - ModelType type) = 0;
|
| + // Returns a callback to retrieve a syncable service specified by |type|.
|
| + // Both the provider and the resulting weak pointer will only be accessed on
|
| + // the model thread.
|
| + virtual ServiceProvider GetSyncableServiceForType(ModelType type) = 0;
|
|
|
| // Returns a weak pointer to the ModelTypeSyncBridge specified by |type|. Weak
|
| // pointer may be unset if service is already destroyed.
|
|
|