summaryrefslogtreecommitdiffstats
path: root/sync/internal_api/public/engine/passive_model_worker.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sync/internal_api/public/engine/passive_model_worker.cc')
-rw-r--r--sync/internal_api/public/engine/passive_model_worker.cc28
1 files changed, 28 insertions, 0 deletions
diff --git a/sync/internal_api/public/engine/passive_model_worker.cc b/sync/internal_api/public/engine/passive_model_worker.cc
new file mode 100644
index 0000000..26fccc1
--- /dev/null
+++ b/sync/internal_api/public/engine/passive_model_worker.cc
@@ -0,0 +1,28 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "sync/internal_api/public/engine/passive_model_worker.h"
+
+#include "base/message_loop.h"
+
+namespace browser_sync {
+
+PassiveModelWorker::PassiveModelWorker(const MessageLoop* sync_loop)
+ : sync_loop_(sync_loop) {}
+
+PassiveModelWorker::~PassiveModelWorker() {
+}
+
+SyncerError PassiveModelWorker::DoWorkAndWaitUntilDone(
+ const WorkCallback& work) {
+ DCHECK_EQ(MessageLoop::current(), sync_loop_);
+ // Simply do the work on the current thread.
+ return work.Run();
+}
+
+ModelSafeGroup PassiveModelWorker::GetModelSafeGroup() {
+ return GROUP_PASSIVE;
+}
+
+} // namespace browser_sync