1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_SYNC_GLUE_PASSWORD_DATA_TYPE_CONTROLLER_H__
6 #define CHROME_BROWSER_SYNC_GLUE_PASSWORD_DATA_TYPE_CONTROLLER_H__
10 #include "base/memory/ref_counted.h"
11 #include "components/sync_driver/non_ui_data_type_controller.h"
14 class ProfileSyncComponentsFactory;
16 namespace password_manager {
20 namespace browser_sync {
22 // A class that manages the startup and shutdown of password sync.
23 class PasswordDataTypeController : public sync_driver::NonUIDataTypeController {
25 PasswordDataTypeController(
26 ProfileSyncComponentsFactory* profile_sync_factory,
29 // NonFrontendDataTypeController implementation
30 virtual syncer::ModelType type() const OVERRIDE;
31 virtual syncer::ModelSafeGroup model_safe_group() const OVERRIDE;
34 virtual ~PasswordDataTypeController();
36 // NonUIDataTypeController interface.
37 virtual bool PostTaskOnBackendThread(
38 const tracked_objects::Location& from_here,
39 const base::Closure& task) OVERRIDE;
40 virtual bool StartModels() OVERRIDE;
43 Profile* const profile_;
44 scoped_refptr<password_manager::PasswordStore> password_store_;
46 DISALLOW_COPY_AND_ASSIGN(PasswordDataTypeController);
49 } // namespace browser_sync
51 #endif // CHROME_BROWSER_SYNC_GLUE_PASSWORD_DATA_TYPE_CONTROLLER_H__