| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef SYNC_INTERNAL_API_PUBLIC_ENGINE_CONTROL_MODEL_WORKER_H_ |
| 6 #define SYNC_INTERNAL_API_PUBLIC_ENGINE_CONTROL_MODEL_WORKER_H_ |
| 7 |
| 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" |
| 10 #include "sync/base/sync_export.h" |
| 11 #include "sync/internal_api/public/engine/model_safe_worker.h" |
| 12 #include "sync/internal_api/public/util/syncer_error.h" |
| 13 |
| 14 class MessageLoop; |
| 15 |
| 16 namespace syncer { |
| 17 |
| 18 // Implementation of ModelSafeWorker for control types. All work is |
| 19 // done on the same thread DoWorkAndWaitUntilDone (i.e., the sync |
| 20 // thread). |
| 21 class SYNC_EXPORT ControlModelWorker : public ModelSafeWorker { |
| 22 public: |
| 23 explicit ControlModelWorker(const MessageLoop* sync_loop); |
| 24 |
| 25 // ModelSafeWorker implementation. Called on the sync thread. |
| 26 virtual SyncerError DoWorkAndWaitUntilDone( |
| 27 const WorkCallback& work) OVERRIDE; |
| 28 virtual ModelSafeGroup GetModelSafeGroup() OVERRIDE; |
| 29 |
| 30 private: |
| 31 virtual ~ControlModelWorker(); |
| 32 |
| 33 const MessageLoop* const sync_loop_; |
| 34 |
| 35 DISALLOW_COPY_AND_ASSIGN(ControlModelWorker); |
| 36 }; |
| 37 |
| 38 } // namespace syncer |
| 39 |
| 40 #endif // SYNC_INTERNAL_API_PUBLIC_ENGINE_CONTROL_MODEL_WORKER_H_ |
| OLD | NEW |