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