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