OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_NON_UI_DATA_TYPE_CONTROLLER_H_ | 5 #ifndef COMPONENTS_SYNC_DRIVER_NON_UI_DATA_TYPE_CONTROLLER_H_ |
6 #define COMPONENTS_SYNC_DRIVER_NON_UI_DATA_TYPE_CONTROLLER_H_ | 6 #define COMPONENTS_SYNC_DRIVER_NON_UI_DATA_TYPE_CONTROLLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
14 #include "components/sync_driver/data_type_controller.h" | 14 #include "components/sync_driver/data_type_controller.h" |
15 #include "components/sync_driver/shared_change_processor.h" | 15 #include "components/sync_driver/shared_change_processor.h" |
16 | 16 |
17 namespace syncer { | 17 namespace syncer { |
18 class SyncableService; | 18 class SyncableService; |
19 } | 19 } |
20 | 20 |
21 namespace browser_sync { | 21 namespace sync_driver { |
22 | 22 |
23 class SyncApiComponentFactory; | 23 class SyncApiComponentFactory; |
24 | 24 |
25 class NonUIDataTypeController : public DataTypeController { | 25 class NonUIDataTypeController : public DataTypeController { |
26 public: | 26 public: |
27 NonUIDataTypeController( | 27 NonUIDataTypeController( |
28 scoped_refptr<base::MessageLoopProxy> ui_thread, | 28 scoped_refptr<base::MessageLoopProxy> ui_thread, |
29 const base::Closure& error_callback, | 29 const base::Closure& error_callback, |
30 const DisableTypeCallback& disable_callback, | 30 const DisableTypeCallback& disable_callback, |
31 SyncApiComponentFactory* sync_factory); | 31 SyncApiComponentFactory* sync_factory); |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 // A weak pointer to the actual local syncable service, which performs all the | 155 // A weak pointer to the actual local syncable service, which performs all the |
156 // real work. We do not own the object, and it is only safe to access on the | 156 // real work. We do not own the object, and it is only safe to access on the |
157 // DataType's thread. | 157 // DataType's thread. |
158 // Lifetime: it gets set in StartAssociationWithSharedChangeProcessor(...) | 158 // Lifetime: it gets set in StartAssociationWithSharedChangeProcessor(...) |
159 // and released in StopLocalService(). | 159 // and released in StopLocalService(). |
160 base::WeakPtr<syncer::SyncableService> local_service_; | 160 base::WeakPtr<syncer::SyncableService> local_service_; |
161 | 161 |
162 scoped_refptr<base::MessageLoopProxy> ui_thread_; | 162 scoped_refptr<base::MessageLoopProxy> ui_thread_; |
163 }; | 163 }; |
164 | 164 |
165 } // namespace browser_sync | 165 } // namespace sync_driver |
166 | 166 |
167 #endif // COMPONENTS_SYNC_DRIVER_NON_UI_DATA_TYPE_CONTROLLER_H_ | 167 #endif // COMPONENTS_SYNC_DRIVER_NON_UI_DATA_TYPE_CONTROLLER_H_ |
OLD | NEW |