| Index: components/sync_driver/data_type_controller.h
|
| diff --git a/components/sync_driver/data_type_controller.h b/components/sync_driver/data_type_controller.h
|
| index ab6a517f39878b15bcd35db8e0c749f9453d06b0..c5645c9cc73acf5b4f145ed88bfec6795393a8f3 100644
|
| --- a/components/sync_driver/data_type_controller.h
|
| +++ b/components/sync_driver/data_type_controller.h
|
| @@ -14,9 +14,7 @@
|
| #include "base/memory/ref_counted_delete_on_message_loop.h"
|
| #include "base/sequenced_task_runner_helpers.h"
|
| #include "components/sync_driver/data_type_error_handler.h"
|
| -#include "sync/api/sync_merge_result.h"
|
| #include "sync/internal_api/public/base/model_type.h"
|
| -#include "sync/internal_api/public/engine/model_safe_worker.h"
|
| #include "sync/internal_api/public/util/unrecoverable_error_handler.h"
|
|
|
| namespace base {
|
| @@ -25,12 +23,11 @@ class SingleThreadTaskRunner;
|
|
|
| namespace syncer {
|
| class SyncError;
|
| -struct UserShare;
|
| +class SyncMergeResult;
|
| }
|
|
|
| namespace sync_driver {
|
| -
|
| -class ChangeProcessor;
|
| +class BackendDataTypeConfigurer;
|
|
|
| // Data type controllers need to be refcounted threadsafe, as they may
|
| // need to run model associator or change processor on other threads.
|
| @@ -78,9 +75,6 @@ class DataTypeController
|
| typedef base::Callback<void(syncer::ModelType,
|
| syncer::SyncError)> ModelLoadCallback;
|
|
|
| - typedef base::Callback<void(const tracked_objects::Location& location,
|
| - const std::string&)> DisableTypeCallback;
|
| -
|
| typedef std::map<syncer::ModelType,
|
| scoped_refptr<DataTypeController> > TypeMap;
|
| typedef std::map<syncer::ModelType, DataTypeController::State> StateMap;
|
| @@ -104,6 +98,14 @@ class DataTypeController
|
| // be invoked.
|
| virtual void StartAssociating(const StartCallback& start_callback) = 0;
|
|
|
| + // Activates the controlled data type.
|
| + // Supposed to be called from DataTypeManager.
|
| + virtual void ActivateDataType(BackendDataTypeConfigurer* configurer) = 0;
|
| +
|
| + // Deactivates th controlled data type.
|
| + // Supposed to be called from DataTypeManager.
|
| + virtual void DeactivateDataType(BackendDataTypeConfigurer* configurer) = 0;
|
| +
|
| // Synchronously stops the data type. If StartAssociating has already been
|
| // called but is not done yet it will be aborted. Similarly if LoadModels
|
| // has not completed it will also be aborted.
|
| @@ -120,15 +122,6 @@ class DataTypeController
|
| // Name of this data type. For logging purposes only.
|
| virtual std::string name() const = 0;
|
|
|
| - // The model safe group of this data type. This should reflect the
|
| - // thread that should be used to modify the data type's native
|
| - // model.
|
| - virtual syncer::ModelSafeGroup model_safe_group() const = 0;
|
| -
|
| - // Access to the ChangeProcessor for the type being controlled by |this|.
|
| - // Returns NULL if the ChangeProcessor isn't created or connected.
|
| - virtual ChangeProcessor* GetChangeProcessor() const = 0;
|
| -
|
| // Current state of the data type controller.
|
| virtual State state() const = 0;
|
|
|
| @@ -139,10 +132,6 @@ class DataTypeController
|
| const std::string& message,
|
| syncer::ModelType type) override;
|
|
|
| - // Called when the sync backend has initialized. |share| is the
|
| - // UserShare handle to associate model data with.
|
| - void OnUserShareReady(syncer::UserShare* share);
|
| -
|
| // Whether the DataTypeController is ready to start. This is useful if the
|
| // datatype itself must make the decision about whether it should be enabled
|
| // at all (and therefore whether the initial download of the sync data for
|
| @@ -164,14 +153,9 @@ class DataTypeController
|
|
|
| ~DataTypeController() override;
|
|
|
| - syncer::UserShare* user_share() const;
|
| -
|
| // The callback that will be invoked when an unrecoverable error occurs.
|
| // TODO(sync): protected for use by legacy controllers.
|
| base::Closure error_callback_;
|
| -
|
| - private:
|
| - syncer::UserShare* user_share_;
|
| };
|
|
|
| } // namespace sync_driver
|
|
|