OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_SYNC_GLUE_EXTENSION_SETTING_DATA_TYPE_CONTROLLER_H__ | 5 #ifndef CHROME_BROWSER_SYNC_GLUE_EXTENSION_SETTING_DATA_TYPE_CONTROLLER_H__ |
6 #define CHROME_BROWSER_SYNC_GLUE_EXTENSION_SETTING_DATA_TYPE_CONTROLLER_H__ | 6 #define CHROME_BROWSER_SYNC_GLUE_EXTENSION_SETTING_DATA_TYPE_CONTROLLER_H__ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "components/sync/driver/non_ui_data_type_controller.h" | 12 #include "components/sync/driver/async_directory_type_controller.h" |
13 | 13 |
14 class Profile; | 14 class Profile; |
15 | 15 |
16 namespace syncer { | 16 namespace syncer { |
17 class SyncClient; | 17 class SyncClient; |
18 } | 18 } |
19 | 19 |
20 namespace browser_sync { | 20 namespace browser_sync { |
21 | 21 |
22 class ExtensionSettingDataTypeController | 22 class ExtensionSettingDataTypeController |
23 : public syncer::NonUIDataTypeController { | 23 : public syncer::AsyncDirectoryTypeController { |
24 public: | 24 public: |
25 // |type| is either EXTENSION_SETTINGS or APP_SETTINGS. | 25 // |type| is either EXTENSION_SETTINGS or APP_SETTINGS. |
26 // |dump_stack| is called when an unrecoverable error occurs. | 26 // |dump_stack| is called when an unrecoverable error occurs. |
27 ExtensionSettingDataTypeController(syncer::ModelType type, | 27 ExtensionSettingDataTypeController(syncer::ModelType type, |
28 const base::Closure& dump_stack, | 28 const base::Closure& dump_stack, |
29 syncer::SyncClient* sync_client, | 29 syncer::SyncClient* sync_client, |
30 Profile* profile); | 30 Profile* profile); |
31 ~ExtensionSettingDataTypeController() override; | 31 ~ExtensionSettingDataTypeController() override; |
32 | 32 |
33 private: | 33 private: |
34 // NonUIDataTypeController implementation. | 34 // AsyncDirectoryTypeController implementation. |
35 bool StartModels() override; | 35 bool StartModels() override; |
36 | 36 |
37 // Only used on the UI thread. | 37 // Only used on the UI thread. |
38 Profile* profile_; | 38 Profile* profile_; |
39 | 39 |
40 DISALLOW_COPY_AND_ASSIGN(ExtensionSettingDataTypeController); | 40 DISALLOW_COPY_AND_ASSIGN(ExtensionSettingDataTypeController); |
41 }; | 41 }; |
42 | 42 |
43 } // namespace browser_sync | 43 } // namespace browser_sync |
44 | 44 |
45 #endif // CHROME_BROWSER_SYNC_GLUE_EXTENSION_SETTING_DATA_TYPE_CONTROLLER_H__ | 45 #endif // CHROME_BROWSER_SYNC_GLUE_EXTENSION_SETTING_DATA_TYPE_CONTROLLER_H__ |
OLD | NEW |