Index: chrome/browser/sync/glue/password_data_type_controller.h |
diff --git a/chrome/browser/sync/glue/password_data_type_controller.h b/chrome/browser/sync/glue/password_data_type_controller.h |
index 1a3a9e4180078e16013c14522cf87ee857f346b1..f2e14f8b264aa2f0790c823f722ca32da48b7d02 100644 |
--- a/chrome/browser/sync/glue/password_data_type_controller.h |
+++ b/chrome/browser/sync/glue/password_data_type_controller.h |
@@ -8,83 +8,40 @@ |
#include <string> |
-#include "base/basictypes.h" |
#include "base/memory/scoped_ptr.h" |
-#include "base/synchronization/waitable_event.h" |
-#include "chrome/browser/sync/profile_sync_service.h" |
-#include "chrome/browser/sync/glue/data_type_controller.h" |
+#include "chrome/browser/sync/glue/non_frontend_data_type_controller.h" |
class PasswordStore; |
-class Profile; |
-class ProfileSyncFactory; |
-class ProfileSyncService; |
namespace browser_sync { |
-class AssociatorInterface; |
-class ChangeProcessor; |
-class ControlTask; |
- |
// A class that manages the startup and shutdown of password sync. |
-class PasswordDataTypeController : public DataTypeController { |
+class PasswordDataTypeController : public NonFrontendDataTypeController { |
public: |
PasswordDataTypeController( |
ProfileSyncFactory* profile_sync_factory, |
- Profile* profile, |
- ProfileSyncService* sync_service); |
+ Profile* profile); |
virtual ~PasswordDataTypeController(); |
- // DataTypeController implementation |
- virtual void Start(StartCallback* start_callback); |
- |
- virtual void Stop(); |
- |
- virtual bool enabled(); |
- |
+ // NonFrontendDataTypeController implementation |
virtual syncable::ModelType type() const; |
- |
virtual browser_sync::ModelSafeGroup model_safe_group() const; |
- virtual std::string name() const; |
- |
- virtual State state() const; |
- |
- // UnrecoverableHandler implementation |
- virtual void OnUnrecoverableError(const tracked_objects::Location& from_here, |
- const std::string& message); |
+ protected: |
+ // NonFrontendDataTypeController interface. |
+ virtual bool StartModels(); |
+ virtual bool StartAssociationAsync(); |
+ virtual void CreateSyncComponents(); |
+ virtual bool StopAssociationAsync(); |
+ virtual void RecordUnrecoverableError( |
+ const tracked_objects::Location& from_here, |
+ const std::string& message); |
+ virtual void RecordAssociationTime(base::TimeDelta time); |
+ virtual void RecordStartFailure(StartResult result); |
private: |
- void StartImpl(); |
- void StartDone(StartResult result, State state); |
- void StartDoneImpl(StartResult result, State state); |
- void StopImpl(); |
- void StartFailed(StartResult result); |
- void OnUnrecoverableErrorImpl(const tracked_objects::Location& from_here, |
- const std::string& message); |
- |
- void set_state(State state) { |
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
- state_ = state; |
- } |
- |
- ProfileSyncFactory* profile_sync_factory_; |
- Profile* profile_; |
- ProfileSyncService* sync_service_; |
- State state_; |
- |
- scoped_ptr<AssociatorInterface> model_associator_; |
- scoped_ptr<ChangeProcessor> change_processor_; |
- scoped_ptr<StartCallback> start_callback_; |
scoped_refptr<PasswordStore> password_store_; |
- base::Lock abort_association_lock_; |
- bool abort_association_; |
- base::WaitableEvent abort_association_complete_; |
- |
- // Barrier to ensure that the datatype has been stopped on the DB thread |
- // from the UI thread. |
- base::WaitableEvent datatype_stopped_; |
- |
DISALLOW_COPY_AND_ASSIGN(PasswordDataTypeController); |
}; |