| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_REGISTRAR_H_ | 5 #ifndef COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_REGISTRAR_H_ |
| 6 #define COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_REGISTRAR_H_ | 6 #define COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_REGISTRAR_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 | 144 |
| 145 // Add a worker for |group| to the worker map if one can be created. | 145 // Add a worker for |group| to the worker map if one can be created. |
| 146 void MaybeAddWorker(ModelSafeGroup group); | 146 void MaybeAddWorker(ModelSafeGroup group); |
| 147 | 147 |
| 148 // Callback after workers unregister from observing destruction of their | 148 // Callback after workers unregister from observing destruction of their |
| 149 // working loops. | 149 // working loops. |
| 150 void OnWorkerUnregistrationDone(ModelSafeGroup group); | 150 void OnWorkerUnregistrationDone(ModelSafeGroup group); |
| 151 | 151 |
| 152 void RemoveWorker(ModelSafeGroup group); | 152 void RemoveWorker(ModelSafeGroup group); |
| 153 | 153 |
| 154 // Returns the change processor for the given model, or NULL if none | 154 // Returns the change processor for the given model, or null if none |
| 155 // exists. Must be called from |group|'s native thread. | 155 // exists. Must be called from |group|'s native thread. |
| 156 ChangeProcessor* GetProcessor(ModelType type) const; | 156 ChangeProcessor* GetProcessor(ModelType type) const; |
| 157 | 157 |
| 158 // Must be called with |lock_| held. Simply returns the change | 158 // Must be called with |lock_| held. Simply returns the change |
| 159 // processor for the given type, if it exists. May be called from | 159 // processor for the given type, if it exists. May be called from |
| 160 // any thread. | 160 // any thread. |
| 161 ChangeProcessor* GetProcessorUnsafe(ModelType type) const; | 161 ChangeProcessor* GetProcessorUnsafe(ModelType type) const; |
| 162 | 162 |
| 163 // Return true if |model_type| lives on the current thread. Must be | 163 // Return true if |model_type| lives on the current thread. Must be |
| 164 // called with |lock_| held. May be called on any thread. | 164 // called with |lock_| held. May be called on any thread. |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 // Set of types with non-blocking implementation (as opposed to directory | 219 // Set of types with non-blocking implementation (as opposed to directory |
| 220 // based). | 220 // based). |
| 221 ModelTypeSet non_blocking_types_; | 221 ModelTypeSet non_blocking_types_; |
| 222 | 222 |
| 223 DISALLOW_COPY_AND_ASSIGN(SyncBackendRegistrar); | 223 DISALLOW_COPY_AND_ASSIGN(SyncBackendRegistrar); |
| 224 }; | 224 }; |
| 225 | 225 |
| 226 } // namespace syncer | 226 } // namespace syncer |
| 227 | 227 |
| 228 #endif // COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_REGISTRAR_H_ | 228 #endif // COMPONENTS_SYNC_DRIVER_GLUE_SYNC_BACKEND_REGISTRAR_H_ |
| OLD | NEW |