Chromium Code Reviews| 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..b046566778a90cdb0f010a65e46924fd5f7ae5b4 100644 |
| --- a/chrome/browser/sync/glue/password_data_type_controller.h |
| +++ b/chrome/browser/sync/glue/password_data_type_controller.h |
| @@ -8,25 +8,15 @@ |
| #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, |
| @@ -34,57 +24,24 @@ class PasswordDataTypeController : public DataTypeController { |
| ProfileSyncService* sync_service); |
| 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); |
| - |
| 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; |
| - } |
| + // NonFrontendDataTypeController interface. |
|
tim (not reviewing)
2011/04/07 22:04:25
although I myself have once or twice enjoyed pulli
Nicolas Zea
2011/04/08 16:53:42
They're protected on the NonFrontendDataTypeContro
|
| + virtual bool StartModels(); |
| + virtual bool KickOffAssociation(); |
| + virtual void CreateSyncComponents(); |
| + virtual bool KickOffDestroy(); |
| + virtual void RecordUnrecoverableError( |
| + const tracked_objects::Location& from_here, |
| + const std::string& message); |
| + virtual void RecordAssociationTime(base::TimeDelta time); |
| + virtual void RecordStartFailure(StartResult result); |
| - 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); |
| }; |