Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / sync / glue / password_data_type_controller.h
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.
4
5 #ifndef CHROME_BROWSER_SYNC_GLUE_PASSWORD_DATA_TYPE_CONTROLLER_H__
6 #define CHROME_BROWSER_SYNC_GLUE_PASSWORD_DATA_TYPE_CONTROLLER_H__
7
8 #include <string>
9
10 #include "base/memory/ref_counted.h"
11 #include "components/sync_driver/non_ui_data_type_controller.h"
12
13 class Profile;
14 class ProfileSyncComponentsFactory;
15
16 namespace password_manager {
17 class PasswordStore;
18 }
19
20 namespace browser_sync {
21
22 // A class that manages the startup and shutdown of password sync.
23 class PasswordDataTypeController : public sync_driver::NonUIDataTypeController {
24  public:
25   PasswordDataTypeController(
26       ProfileSyncComponentsFactory* profile_sync_factory,
27       Profile* profile);
28
29   // NonFrontendDataTypeController implementation
30   syncer::ModelType type() const override;
31   syncer::ModelSafeGroup model_safe_group() const override;
32
33  protected:
34   ~PasswordDataTypeController() override;
35
36   // NonUIDataTypeController interface.
37   bool PostTaskOnBackendThread(const tracked_objects::Location& from_here,
38                                const base::Closure& task) override;
39   bool StartModels() override;
40
41  private:
42   Profile* const profile_;
43   scoped_refptr<password_manager::PasswordStore> password_store_;
44
45   DISALLOW_COPY_AND_ASSIGN(PasswordDataTypeController);
46 };
47
48 }  // namespace browser_sync
49
50 #endif  // CHROME_BROWSER_SYNC_GLUE_PASSWORD_DATA_TYPE_CONTROLLER_H__