| Index: sync/internal_api/public/engine/control_model_worker.cc
|
| diff --git a/sync/internal_api/public/engine/control_model_worker.cc b/sync/internal_api/public/engine/control_model_worker.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..78f848c944467144d46538ff08167083c3050dd6
|
| --- /dev/null
|
| +++ b/sync/internal_api/public/engine/control_model_worker.cc
|
| @@ -0,0 +1,29 @@
|
| +// 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/control_model_worker.h"
|
| +
|
| +#include "base/message_loop.h"
|
| +
|
| +namespace syncer {
|
| +
|
| +ControlModelWorker::ControlModelWorker(const MessageLoop* sync_loop)
|
| + : sync_loop_(sync_loop) {}
|
| +
|
| +ControlModelWorker::~ControlModelWorker() {
|
| +}
|
| +
|
| +SyncerError ControlModelWorker::DoWorkAndWaitUntilDone(
|
| + const WorkCallback& work) {
|
| + DCHECK_EQ(MessageLoop::current(), sync_loop_);
|
| + // Simply do the work on the current thread.
|
| + return work.Run();
|
| +}
|
| +
|
| +ModelSafeGroup ControlModelWorker::GetModelSafeGroup() {
|
| + return GROUP_CONTROL;
|
| +}
|
| +
|
| +} // namespace syncer
|
| +
|
|
|