| Index: components/sync/driver/sync_api_component_factory.h
|
| diff --git a/components/sync/driver/sync_api_component_factory.h b/components/sync/driver/sync_api_component_factory.h
|
| index 3d59ad76a614b142531c1f68f2835467b887d06e..220ff5b2d0d544965a8d7105e322dad56f60e81b 100644
|
| --- a/components/sync/driver/sync_api_component_factory.h
|
| +++ b/components/sync/driver/sync_api_component_factory.h
|
| @@ -19,10 +19,6 @@ namespace base {
|
| class FilePath;
|
| } // namespace base
|
|
|
| -namespace browser_sync {
|
| -class SyncBackendHost;
|
| -} // namespace browser_sync
|
| -
|
| namespace history {
|
| class HistoryBackend;
|
| }
|
| @@ -32,25 +28,22 @@ class InvalidationService;
|
| } // namespace invalidation
|
|
|
| namespace syncer {
|
| -class DataTypeDebugInfoListener;
|
| -class SyncableService;
|
| -
|
| -struct UserShare;
|
| -} // namespace syncer
|
| -
|
| -namespace sync_driver {
|
|
|
| class AssociatorInterface;
|
| class ChangeProcessor;
|
| +class DataTypeDebugInfoListener;
|
| class DataTypeEncryptionHandler;
|
| class DataTypeManager;
|
| class DataTypeManagerObserver;
|
| class DataTypeStatusTable;
|
| class GenericChangeProcessor;
|
| class LocalDeviceInfoProvider;
|
| -class SyncPrefs;
|
| +class SyncBackendHost;
|
| class SyncClient;
|
| +class SyncPrefs;
|
| class SyncService;
|
| +class SyncableService;
|
| +struct UserShare;
|
|
|
| // This factory provides sync driver code with the model type specific sync/api
|
| // service (like SyncableService) implementations.
|
| @@ -61,9 +54,9 @@ class SyncApiComponentFactory {
|
| // data type controllers.
|
| // |disabled_types| and |enabled_types| control the disable/enable state of
|
| // types that are on or off by default (respectively).
|
| - typedef base::Callback<void(sync_driver::SyncService* sync_service,
|
| - syncer::ModelTypeSet disabled_types,
|
| - syncer::ModelTypeSet enabled_types)>
|
| + typedef base::Callback<void(SyncService* sync_service,
|
| + ModelTypeSet disabled_types,
|
| + ModelTypeSet enabled_types)>
|
| RegisterDataTypesMethod;
|
|
|
| // The various factory methods for the data type model associators
|
| @@ -73,51 +66,49 @@ class SyncApiComponentFactory {
|
| //
|
| // 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
|
| - // weak pointer to a syncer::SyncableService. All others continue to return
|
| + // weak pointer to 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 using the new API switch to returning
|
| // SyncableService weak pointers instead of SyncComponents (crbug.com/100114).
|
| struct SyncComponents {
|
| - sync_driver::AssociatorInterface* model_associator;
|
| - sync_driver::ChangeProcessor* change_processor;
|
| - SyncComponents(sync_driver::AssociatorInterface* ma,
|
| - sync_driver::ChangeProcessor* cp)
|
| + AssociatorInterface* model_associator;
|
| + ChangeProcessor* change_processor;
|
| + SyncComponents(AssociatorInterface* ma, ChangeProcessor* cp)
|
| : model_associator(ma), change_processor(cp) {}
|
| };
|
|
|
| // Creates and registers enabled datatypes with the provided SyncClient.
|
| virtual void RegisterDataTypes(
|
| - sync_driver::SyncService* sync_service,
|
| + SyncService* sync_service,
|
| const RegisterDataTypesMethod& register_platform_types_method) = 0;
|
|
|
| // Instantiates a new DataTypeManager with a SyncBackendHost, a list of data
|
| // type controllers and a DataTypeManagerObserver. The return pointer is
|
| // owned by the caller.
|
| - virtual sync_driver::DataTypeManager* CreateDataTypeManager(
|
| - const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>&
|
| - debug_info_listener,
|
| - const sync_driver::DataTypeController::TypeMap* controllers,
|
| - const sync_driver::DataTypeEncryptionHandler* encryption_handler,
|
| - browser_sync::SyncBackendHost* backend,
|
| - sync_driver::DataTypeManagerObserver* observer) = 0;
|
| + virtual DataTypeManager* CreateDataTypeManager(
|
| + const WeakHandle<DataTypeDebugInfoListener>& debug_info_listener,
|
| + const DataTypeController::TypeMap* controllers,
|
| + const DataTypeEncryptionHandler* encryption_handler,
|
| + SyncBackendHost* backend,
|
| + DataTypeManagerObserver* observer) = 0;
|
|
|
| // Creating this in the factory helps us mock it out in testing.
|
| - virtual browser_sync::SyncBackendHost* CreateSyncBackendHost(
|
| + virtual SyncBackendHost* CreateSyncBackendHost(
|
| const std::string& name,
|
| invalidation::InvalidationService* invalidator,
|
| - const base::WeakPtr<sync_driver::SyncPrefs>& sync_prefs,
|
| + const base::WeakPtr<SyncPrefs>& sync_prefs,
|
| const base::FilePath& sync_folder) = 0;
|
|
|
| // Creating this in the factory helps us mock it out in testing.
|
| - virtual std::unique_ptr<sync_driver::LocalDeviceInfoProvider>
|
| + virtual std::unique_ptr<LocalDeviceInfoProvider>
|
| CreateLocalDeviceInfoProvider() = 0;
|
|
|
| // Legacy datatypes that need to be converted to the SyncableService API.
|
| virtual SyncComponents CreateBookmarkSyncComponents(
|
| - sync_driver::SyncService* sync_service,
|
| - std::unique_ptr<syncer::DataTypeErrorHandler> error_handler) = 0;
|
| + SyncService* sync_service,
|
| + std::unique_ptr<DataTypeErrorHandler> error_handler) = 0;
|
|
|
| // Creates attachment service.
|
| // Note: Should only be called from the model type thread.
|
| @@ -130,14 +121,14 @@ class SyncApiComponentFactory {
|
| // asynchronous events (AttachmentUploaded). Pass NULL if delegate is not
|
| // provided. AttachmentService doesn't take ownership of delegate, the pointer
|
| // must be valid throughout AttachmentService lifetime.
|
| - virtual std::unique_ptr<syncer::AttachmentService> CreateAttachmentService(
|
| - std::unique_ptr<syncer::AttachmentStoreForSync> attachment_store,
|
| - const syncer::UserShare& user_share,
|
| + virtual std::unique_ptr<AttachmentService> CreateAttachmentService(
|
| + std::unique_ptr<AttachmentStoreForSync> attachment_store,
|
| + const UserShare& user_share,
|
| const std::string& store_birthday,
|
| - syncer::ModelType model_type,
|
| - syncer::AttachmentService::Delegate* delegate) = 0;
|
| + ModelType model_type,
|
| + AttachmentService::Delegate* delegate) = 0;
|
| };
|
|
|
| -} // namespace sync_driver
|
| +} // namespace syncer
|
|
|
| #endif // COMPONENTS_SYNC_DRIVER_SYNC_API_COMPONENT_FACTORY_H_
|
|
|