Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / sync / glue / extension_setting_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_EXTENSION_SETTING_DATA_TYPE_CONTROLLER_H__
6 #define CHROME_BROWSER_SYNC_GLUE_EXTENSION_SETTING_DATA_TYPE_CONTROLLER_H__
7
8 #include <string>
9
10 #include "base/compiler_specific.h"
11 #include "components/sync_driver/non_ui_data_type_controller.h"
12
13 class Profile;
14 class ProfileSyncComponentsFactory;
15
16 namespace syncer {
17 class SyncableService;
18 }
19
20 namespace extensions {
21 class StorageFrontend;
22 }
23
24 namespace browser_sync {
25
26 class ExtensionSettingDataTypeController
27     : public sync_driver::NonUIDataTypeController {
28  public:
29   ExtensionSettingDataTypeController(
30       // Either EXTENSION_SETTINGS or APP_SETTINGS.
31       syncer::ModelType type,
32       ProfileSyncComponentsFactory* profile_sync_factory,
33       Profile* profile);
34
35   // NonFrontendDataTypeController implementation
36   virtual syncer::ModelType type() const OVERRIDE;
37   virtual syncer::ModelSafeGroup model_safe_group() const OVERRIDE;
38
39  private:
40   virtual ~ExtensionSettingDataTypeController();
41
42   // NonFrontendDataTypeController implementation.
43   virtual bool PostTaskOnBackendThread(
44       const tracked_objects::Location& from_here,
45       const base::Closure& task) OVERRIDE;
46   virtual bool StartModels() OVERRIDE;
47
48   // Either EXTENSION_SETTINGS or APP_SETTINGS.
49   syncer::ModelType type_;
50
51   // Only used on the UI thread.
52   Profile* profile_;
53
54   DISALLOW_COPY_AND_ASSIGN(ExtensionSettingDataTypeController);
55 };
56
57 }  // namespace browser_sync
58
59 #endif  // CHROME_BROWSER_SYNC_GLUE_EXTENSION_SETTING_DATA_TYPE_CONTROLLER_H__