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 #include "sync/internal_api/public/engine/passive_model_worker.h" | 5 #include "components/sync/engine/passive_model_worker.h" |
6 | 6 |
7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 | 8 |
9 namespace syncer { | 9 namespace syncer { |
10 | 10 |
11 PassiveModelWorker::PassiveModelWorker(WorkerLoopDestructionObserver* observer) | 11 PassiveModelWorker::PassiveModelWorker(WorkerLoopDestructionObserver* observer) |
12 : ModelSafeWorker(observer) {} | 12 : ModelSafeWorker(observer) {} |
13 | 13 |
14 PassiveModelWorker::~PassiveModelWorker() { | 14 PassiveModelWorker::~PassiveModelWorker() {} |
15 } | |
16 | 15 |
17 void PassiveModelWorker::RegisterForLoopDestruction() { | 16 void PassiveModelWorker::RegisterForLoopDestruction() { |
18 SetWorkingLoopToCurrent(); | 17 SetWorkingLoopToCurrent(); |
19 } | 18 } |
20 | 19 |
21 SyncerError PassiveModelWorker::DoWorkAndWaitUntilDoneImpl( | 20 SyncerError PassiveModelWorker::DoWorkAndWaitUntilDoneImpl( |
22 const WorkCallback& work) { | 21 const WorkCallback& work) { |
23 // Simply do the work on the current thread. | 22 // Simply do the work on the current thread. |
24 return work.Run(); | 23 return work.Run(); |
25 } | 24 } |
26 | 25 |
27 ModelSafeGroup PassiveModelWorker::GetModelSafeGroup() { | 26 ModelSafeGroup PassiveModelWorker::GetModelSafeGroup() { |
28 return GROUP_PASSIVE; | 27 return GROUP_PASSIVE; |
29 } | 28 } |
30 | 29 |
31 } // namespace syncer | 30 } // namespace syncer |
OLD | NEW |