OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 SYNC_INTERNAL_API_PUBLIC_ENGINE_PASSIVE_MODEL_WORKER_H_ | 5 #ifndef COMPONENTS_SYNC_ENGINE_PASSIVE_MODEL_WORKER_H_ |
6 #define SYNC_INTERNAL_API_PUBLIC_ENGINE_PASSIVE_MODEL_WORKER_H_ | 6 #define COMPONENTS_SYNC_ENGINE_PASSIVE_MODEL_WORKER_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "sync/base/sync_export.h" | 10 #include "components/sync/base/sync_export.h" |
11 #include "sync/internal_api/public/engine/model_safe_worker.h" | 11 #include "components/sync/base/syncer_error.h" |
12 #include "sync/internal_api/public/util/syncer_error.h" | 12 #include "components/sync/engine/model_safe_worker.h" |
13 | 13 |
14 namespace syncer { | 14 namespace syncer { |
15 | 15 |
16 // Implementation of ModelSafeWorker for passive types. All work is | 16 // Implementation of ModelSafeWorker for passive types. All work is |
17 // done on the same thread DoWorkAndWaitUntilDone (i.e., the sync | 17 // done on the same thread DoWorkAndWaitUntilDone (i.e., the sync |
18 // thread). | 18 // thread). |
19 class SYNC_EXPORT PassiveModelWorker : public ModelSafeWorker { | 19 class SYNC_EXPORT PassiveModelWorker : public ModelSafeWorker { |
20 public: | 20 public: |
21 explicit PassiveModelWorker(WorkerLoopDestructionObserver* observer); | 21 explicit PassiveModelWorker(WorkerLoopDestructionObserver* observer); |
22 | 22 |
23 // ModelSafeWorker implementation. Called on the sync thread. | 23 // ModelSafeWorker implementation. Called on the sync thread. |
24 void RegisterForLoopDestruction() override; | 24 void RegisterForLoopDestruction() override; |
25 ModelSafeGroup GetModelSafeGroup() override; | 25 ModelSafeGroup GetModelSafeGroup() override; |
26 | 26 |
27 protected: | 27 protected: |
28 SyncerError DoWorkAndWaitUntilDoneImpl(const WorkCallback& work) override; | 28 SyncerError DoWorkAndWaitUntilDoneImpl(const WorkCallback& work) override; |
29 | 29 |
30 private: | 30 private: |
31 ~PassiveModelWorker() override; | 31 ~PassiveModelWorker() override; |
32 | 32 |
33 DISALLOW_COPY_AND_ASSIGN(PassiveModelWorker); | 33 DISALLOW_COPY_AND_ASSIGN(PassiveModelWorker); |
34 }; | 34 }; |
35 | 35 |
36 } // namespace syncer | 36 } // namespace syncer |
37 | 37 |
38 #endif // SYNC_INTERNAL_API_PUBLIC_ENGINE_PASSIVE_MODEL_WORKER_H_ | 38 #endif // COMPONENTS_SYNC_ENGINE_PASSIVE_MODEL_WORKER_H_ |
OLD | NEW |