| Index: components/sync/driver/non_blocking_data_type_controller.h
|
| diff --git a/components/sync/driver/non_blocking_data_type_controller.h b/components/sync/driver/non_blocking_data_type_controller.h
|
| index d81b8311f1932cb10557e8c851016e3f6f095fb2..0c28d90d326e4d8a8d1e37868758d0a12d840610 100644
|
| --- a/components/sync/driver/non_blocking_data_type_controller.h
|
| +++ b/components/sync/driver/non_blocking_data_type_controller.h
|
| @@ -14,26 +14,21 @@
|
| #include "components/sync/driver/data_type_controller.h"
|
| #include "components/sync/driver/sync_prefs.h"
|
|
|
| -namespace sync_driver {
|
| -class SyncClient;
|
| -}
|
| +namespace syncer {
|
|
|
| -namespace syncer_v2 {
|
| +class SyncClient;
|
| struct ActivationContext;
|
| -}
|
| -
|
| -namespace sync_driver_v2 {
|
|
|
| // Base class for DataType controllers for Unified Sync and Storage datatypes.
|
| // Derived types must implement the following methods:
|
| // - RunOnModelThread
|
| // - RunOnUIThread
|
| -class NonBlockingDataTypeController : public sync_driver::DataTypeController {
|
| +class NonBlockingDataTypeController : public DataTypeController {
|
| public:
|
| // |dump_stack| is called when an unrecoverable error occurs.
|
| - NonBlockingDataTypeController(syncer::ModelType type,
|
| + NonBlockingDataTypeController(ModelType type,
|
| const base::Closure& dump_stack,
|
| - sync_driver::SyncClient* sync_client);
|
| + SyncClient* sync_client);
|
| ~NonBlockingDataTypeController() override;
|
|
|
| // DataTypeController interface.
|
| @@ -44,13 +39,10 @@ class NonBlockingDataTypeController : public sync_driver::DataTypeController {
|
| // Registers non-blocking data type with sync backend. In the process the
|
| // activation context is passed to ModelTypeRegistry, where ModelTypeWorker
|
| // gets created and connected with ModelTypeProcessor.
|
| - void RegisterWithBackend(
|
| - sync_driver::BackendDataTypeConfigurer* configurer) override;
|
| + void RegisterWithBackend(BackendDataTypeConfigurer* configurer) override;
|
| void StartAssociating(const StartCallback& start_callback) override;
|
| - void ActivateDataType(
|
| - sync_driver::BackendDataTypeConfigurer* configurer) override;
|
| - void DeactivateDataType(
|
| - sync_driver::BackendDataTypeConfigurer* configurer) override;
|
| + void ActivateDataType(BackendDataTypeConfigurer* configurer) override;
|
| + void DeactivateDataType(BackendDataTypeConfigurer* configurer) override;
|
| void Stop() override;
|
| std::string name() const override;
|
| State state() const override;
|
| @@ -62,30 +54,30 @@ class NonBlockingDataTypeController : public sync_driver::DataTypeController {
|
| virtual bool RunOnModelThread(const tracked_objects::Location& from_here,
|
| const base::Closure& task) = 0;
|
|
|
| - std::unique_ptr<syncer::DataTypeErrorHandler> CreateErrorHandler() override;
|
| + std::unique_ptr<DataTypeErrorHandler> CreateErrorHandler() override;
|
|
|
| private:
|
| void RecordStartFailure(ConfigureResult result) const;
|
| - void ReportLoadModelError(const syncer::SyncError& error);
|
| + void ReportLoadModelError(const SyncError& error);
|
|
|
| // If the DataType controller is waiting for models to load, once the models
|
| // are loaded this function should be called to let the base class
|
| // implementation know that it is safe to continue with the activation.
|
| // The error indicates whether the loading completed successfully.
|
| - void LoadModelsDone(ConfigureResult result, const syncer::SyncError& error);
|
| + void LoadModelsDone(ConfigureResult result, const SyncError& error);
|
|
|
| // The function will do the real work when OnProcessorStarted got called. This
|
| // is called on the UI thread.
|
| void OnProcessorStarted(
|
| - syncer::SyncError error,
|
| - std::unique_ptr<syncer_v2::ActivationContext> activation_context);
|
| + SyncError error,
|
| + std::unique_ptr<ActivationContext> activation_context);
|
|
|
| // Sync client
|
| - sync_driver::SyncClient* const sync_client_;
|
| + SyncClient* const sync_client_;
|
|
|
| // Sync prefs. Used for determinig if DisableSync should be called during call
|
| // to Stop().
|
| - sync_driver::SyncPrefs sync_prefs_;
|
| + SyncPrefs sync_prefs_;
|
|
|
| // State of this datatype controller.
|
| State state_;
|
| @@ -95,7 +87,7 @@ class NonBlockingDataTypeController : public sync_driver::DataTypeController {
|
|
|
| // Controller receives |activation_context_| from SharedModelTypeProcessor
|
| // callback and must temporarily own it until ActivateDataType is called.
|
| - std::unique_ptr<syncer_v2::ActivationContext> activation_context_;
|
| + std::unique_ptr<ActivationContext> activation_context_;
|
|
|
| // This is a hack to prevent reconfigurations from crashing, because USS
|
| // activation is not idempotent. RegisterWithBackend only needs to actually do
|
| @@ -106,6 +98,6 @@ class NonBlockingDataTypeController : public sync_driver::DataTypeController {
|
| DISALLOW_COPY_AND_ASSIGN(NonBlockingDataTypeController);
|
| };
|
|
|
| -} // namespace sync_driver_v2
|
| +} // namespace syncer
|
|
|
| #endif // COMPONENTS_SYNC_DRIVER_NON_BLOCKING_DATA_TYPE_CONTROLLER_H_
|
|
|