| Index: chrome/browser/sync/glue/frontend_data_type_controller.h
|
| diff --git a/chrome/browser/sync/glue/frontend_data_type_controller.h b/chrome/browser/sync/glue/frontend_data_type_controller.h
|
| index d228bb99a6297845e58bf12e0965baa2245f45f4..6a2d86313abf9ce7c5d08a33558676eeefe43b74 100644
|
| --- a/chrome/browser/sync/glue/frontend_data_type_controller.h
|
| +++ b/chrome/browser/sync/glue/frontend_data_type_controller.h
|
| @@ -22,6 +22,8 @@ namespace browser_sync {
|
| class AssociatorInterface;
|
| class ChangeProcessor;
|
|
|
| +// TODO(zea): have naming and style match NonFrontendDataTypeController.
|
| +// TODO(zea): Rename frontend to UI (http://crbug.com/78833).
|
| // Implementation for datatypes that reside on the frontend thread
|
| // (UI thread). This is the same thread we perform initialization on, so we
|
| // don't have to worry about thread safety. The main start/stop funtionality is
|
| @@ -44,15 +46,10 @@ class FrontendDataTypeController : public DataTypeController {
|
|
|
| // DataTypeController interface.
|
| virtual void Start(StartCallback* start_callback);
|
| -
|
| virtual void Stop();
|
| -
|
| virtual syncable::ModelType type() const = 0;
|
| -
|
| virtual browser_sync::ModelSafeGroup model_safe_group() const;
|
| -
|
| virtual std::string name() const;
|
| -
|
| virtual State state() const;
|
|
|
| // UnrecoverableErrorHandler interface.
|
| @@ -64,25 +61,33 @@ class FrontendDataTypeController : public DataTypeController {
|
|
|
| // Kick off any dependent services that need to be running before we can
|
| // associate models. The default implementation is a no-op.
|
| + // Return value:
|
| + // True - if models are ready and association can proceed.
|
| + // False - if models are not ready. Associate() should be called when the
|
| + // models are ready. Refer to Start(_) implementation.
|
| virtual bool StartModels();
|
|
|
| // Build sync components and associate models.
|
| + // Return value:
|
| + // True - if association was successful. FinishStart should have been
|
| + // invoked.
|
| + // False - if association failed. StartFailed should have been invoked.
|
| virtual bool Associate();
|
|
|
| + // Datatype specific creation of sync components.
|
| + virtual void CreateSyncComponents() = 0;
|
| +
|
| // Perform any DataType controller specific state cleanup before stopping
|
| // the datatype controller. The default implementation is a no-op.
|
| - virtual void CleanupState();
|
| -
|
| - // Helper method to run the stashed start callback with a given result.
|
| - virtual void FinishStart(StartResult result,
|
| - const tracked_objects::Location& from_here);
|
| + virtual void CleanUpState();
|
|
|
| // Cleans up state and calls callback when start fails.
|
| virtual void StartFailed(StartResult result,
|
| const tracked_objects::Location& from_here);
|
|
|
| - // Datatype specific creation of sync components.
|
| - virtual void CreateSyncComponents() = 0;
|
| + // Helper method to run the stashed start callback with a given result.
|
| + virtual void FinishStart(StartResult result,
|
| + const tracked_objects::Location& from_here);
|
|
|
| // DataType specific histogram methods. Because histograms use static's, the
|
| // specific datatype controllers must implement this themselves.
|
|
|