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 #include "components/sync_driver/non_ui_model_type_controller.h" | 5 #include "components/sync_driver/non_ui_model_type_controller.h" |
6 | 6 |
| 7 #include "components/sync/api/model_type_service.h" |
| 8 #include "components/sync/base/model_type.h" |
| 9 #include "components/sync/core/activation_context.h" |
7 #include "components/sync_driver/sync_client.h" | 10 #include "components/sync_driver/sync_client.h" |
8 #include "sync/api/model_type_service.h" | |
9 #include "sync/internal_api/public/activation_context.h" | |
10 #include "sync/internal_api/public/base/model_type.h" | |
11 | 11 |
12 namespace sync_driver_v2 { | 12 namespace sync_driver_v2 { |
13 | 13 |
14 using sync_driver::SyncClient; | 14 using sync_driver::SyncClient; |
15 | 15 |
16 NonUIModelTypeController::NonUIModelTypeController( | 16 NonUIModelTypeController::NonUIModelTypeController( |
17 const scoped_refptr<base::SingleThreadTaskRunner>& ui_thread, | 17 const scoped_refptr<base::SingleThreadTaskRunner>& ui_thread, |
18 const base::Closure& error_callback, | 18 const base::Closure& error_callback, |
19 syncer::ModelType model_type, | 19 syncer::ModelType model_type, |
20 SyncClient* sync_client) | 20 SyncClient* sync_client) |
21 : NonBlockingDataTypeController(ui_thread, | 21 : NonBlockingDataTypeController(ui_thread, |
22 error_callback, | 22 error_callback, |
23 model_type, | 23 model_type, |
24 sync_client) {} | 24 sync_client) {} |
25 | 25 |
26 NonUIModelTypeController::~NonUIModelTypeController() {} | 26 NonUIModelTypeController::~NonUIModelTypeController() {} |
27 | 27 |
28 void NonUIModelTypeController::RunOnUIThread( | 28 void NonUIModelTypeController::RunOnUIThread( |
29 const tracked_objects::Location& from_here, | 29 const tracked_objects::Location& from_here, |
30 const base::Closure& task) { | 30 const base::Closure& task) { |
31 DCHECK(!BelongsToUIThread()); | 31 DCHECK(!BelongsToUIThread()); |
32 ui_thread()->PostTask(from_here, task); | 32 ui_thread()->PostTask(from_here, task); |
33 } | 33 } |
34 | 34 |
35 } // namespace sync_driver_v2 | 35 } // namespace sync_driver_v2 |
OLD | NEW |