Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Unified Diff: chrome/browser/sync/engine/passive_model_worker.cc

Issue 8625005: [Sync] Make ModelSafeWorker a true interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync to head Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/engine/passive_model_worker.cc
diff --git a/chrome/browser/sync/engine/passive_model_worker.cc b/chrome/browser/sync/engine/passive_model_worker.cc
new file mode 100644
index 0000000000000000000000000000000000000000..d98b4517be2439290f0879b7915a28707cee3873
--- /dev/null
+++ b/chrome/browser/sync/engine/passive_model_worker.cc
@@ -0,0 +1,28 @@
+// Copyright (c) 2011 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 "chrome/browser/sync/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() {
+}
+
+UnrecoverableErrorInfo 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

Powered by Google App Engine
This is Rietveld 408576698