OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 COMPONENTS_SYNC_DRIVER_UI_MODEL_TYPE_CONTROLLER_H_ | 5 #ifndef COMPONENTS_SYNC_DRIVER_UI_MODEL_TYPE_CONTROLLER_H_ |
6 #define COMPONENTS_SYNC_DRIVER_UI_MODEL_TYPE_CONTROLLER_H_ | 6 #define COMPONENTS_SYNC_DRIVER_UI_MODEL_TYPE_CONTROLLER_H_ |
7 | 7 |
8 #include "components/sync/driver/non_blocking_data_type_controller.h" | 8 #include "components/sync/driver/non_blocking_data_type_controller.h" |
9 | 9 |
10 namespace sync_driver { | 10 namespace syncer { |
| 11 |
11 class SyncClient; | 12 class SyncClient; |
12 } | |
13 | |
14 namespace sync_driver_v2 { | |
15 | 13 |
16 // Implementation for Unified Sync and Storage datatypes that reside on the UI | 14 // Implementation for Unified Sync and Storage datatypes that reside on the UI |
17 // thread. | 15 // thread. |
18 class UIModelTypeController : public NonBlockingDataTypeController { | 16 class UIModelTypeController : public NonBlockingDataTypeController { |
19 public: | 17 public: |
20 // |dump_stack| is called when an unrecoverable error occurs. | 18 // |dump_stack| is called when an unrecoverable error occurs. |
21 UIModelTypeController(syncer::ModelType type, | 19 UIModelTypeController(ModelType type, |
22 const base::Closure& dump_stack, | 20 const base::Closure& dump_stack, |
23 sync_driver::SyncClient* sync_client); | 21 SyncClient* sync_client); |
24 ~UIModelTypeController() override; | 22 ~UIModelTypeController() override; |
25 | 23 |
26 private: | 24 private: |
27 // NonBlockingDataTypeController implementations. | 25 // NonBlockingDataTypeController implementations. |
28 // Since this is UI model type controller, we hide this function here. | 26 // Since this is UI model type controller, we hide this function here. |
29 bool RunOnModelThread(const tracked_objects::Location& from_here, | 27 bool RunOnModelThread(const tracked_objects::Location& from_here, |
30 const base::Closure& task) override; | 28 const base::Closure& task) override; |
31 | 29 |
32 DISALLOW_COPY_AND_ASSIGN(UIModelTypeController); | 30 DISALLOW_COPY_AND_ASSIGN(UIModelTypeController); |
33 }; | 31 }; |
34 | 32 |
35 } // namespace sync_driver_v2 | 33 } // namespace syncer |
36 | 34 |
37 #endif // COMPONENTS_SYNC_DRIVER_UI_MODEL_TYPE_CONTROLLER_H_ | 35 #endif // COMPONENTS_SYNC_DRIVER_UI_MODEL_TYPE_CONTROLLER_H_ |
OLD | NEW |