| Index: chrome/browser/sync/profile_sync_factory.h
|
| diff --git a/chrome/browser/sync/profile_sync_factory.h b/chrome/browser/sync/profile_sync_factory.h
|
| index e4bd347ba7caa1846ace703e190c9a3ca6ed61ca..f708ff25111048d1d8592f96288acb207b23164c 100644
|
| --- a/chrome/browser/sync/profile_sync_factory.h
|
| +++ b/chrome/browser/sync/profile_sync_factory.h
|
| @@ -19,10 +19,13 @@ class ExtensionSettingsBackend;
|
| class PasswordStore;
|
| class PersonalDataManager;
|
| class ProfileSyncService;
|
| +class SyncableService;
|
| class WebDatabase;
|
|
|
| namespace browser_sync {
|
| class DataTypeManager;
|
| +class GenericChangeProcessor;
|
| +class SharedChangeProcessor;
|
| class SyncBackendHost;
|
| class UnrecoverableErrorHandler;
|
| }
|
| @@ -38,6 +41,12 @@ class ProfileSyncFactory {
|
| // and change processors all return this struct. This is needed
|
| // because the change processors typically require a type-specific
|
| // model associator at construction time.
|
| + // Note: this interface is deprecated in favor of the SyncableService API.
|
| + // New datatypes that do not live on the UI thread should directly return a
|
| + // SyncableService. All others continue to return SyncComponents. It is safe
|
| + // to assume that the factory methods below are called on the same thread
|
| + // in which the datatype resides.
|
| + // TODO(zea): Have all datatypes just return their SyncableService pointers.
|
| struct SyncComponents {
|
| browser_sync::AssociatorInterface* model_associator;
|
| browser_sync::ChangeProcessor* change_processor;
|
| @@ -64,6 +73,14 @@ class ProfileSyncFactory {
|
| browser_sync::SyncBackendHost* backend,
|
| const browser_sync::DataTypeController::TypeMap* controllers) = 0;
|
|
|
| + virtual browser_sync::GenericChangeProcessor* CreateGenericChangeProcessor(
|
| + ProfileSyncService* profile_sync_service,
|
| + browser_sync::UnrecoverableErrorHandler* error_handler,
|
| + SyncableService* local_service) = 0;
|
| +
|
| + virtual browser_sync::SharedChangeProcessor* CreateSharedChangeProcessor(
|
| + browser_sync::UnrecoverableErrorHandler* error_handler) = 0;
|
| +
|
| // Instantiates both a model associator and change processor for the
|
| // app data type. The pointers in the return struct are
|
| // owned by the caller.
|
| @@ -79,13 +96,12 @@ class ProfileSyncFactory {
|
| WebDatabase* web_database,
|
| browser_sync::UnrecoverableErrorHandler* error_handler) = 0;
|
|
|
| - // Instantiates both a model associator and change processor for the
|
| - // autofill data type. The pointers in the return struct are owned
|
| - // by the caller.
|
| - virtual SyncComponents CreateAutofillProfileSyncComponents(
|
| + // Returns a pointer to the SyncableService associated with the datatype.
|
| + // The SyncableService is not owned by Sync, but by the backend service
|
| + // itself.
|
| + virtual SyncableService* CreateAutofillProfileSyncComponents(
|
| ProfileSyncService* profile_sync_service,
|
| - WebDatabase* web_database,
|
| - browser_sync::UnrecoverableErrorHandler* error_handler) = 0;
|
| + WebDatabase* web_database) = 0;
|
|
|
| // Instantiates both a model associator and change processor for the
|
| // bookmark data type. The pointers in the return struct are owned
|
|
|