Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(180)

Unified Diff: chrome/browser/sync/glue/frontend_data_type_controller.h

Issue 6811003: [Sync] Make generic non-frontend thread datatype controller. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Copy paste :( Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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.
« no previous file with comments | « chrome/browser/sync/glue/bookmark_data_type_controller.cc ('k') | chrome/browser/sync/glue/frontend_data_type_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698