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

Unified Diff: components/sync/engine/passive_model_worker.cc

Issue 2820623002: Revert of [Sync] Refactor ModelSafeWorker::DoWorkAndWaitUntilDone() to avoid code duplication. (Closed)
Patch Set: Created 3 years, 8 months 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
« no previous file with comments | « components/sync/engine/passive_model_worker.h ('k') | components/sync/engine/ui_model_worker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/engine/passive_model_worker.cc
diff --git a/components/sync/engine/passive_model_worker.cc b/components/sync/engine/passive_model_worker.cc
index f8ba2d0392318872ab3c6d4699289116514dde94..6a4f76676e487ccf728959a044c67f298753e5be 100644
--- a/components/sync/engine/passive_model_worker.cc
+++ b/components/sync/engine/passive_model_worker.cc
@@ -4,7 +4,7 @@
#include "components/sync/engine/passive_model_worker.h"
-#include <utility>
+#include "base/callback.h"
namespace syncer {
@@ -12,8 +12,10 @@
PassiveModelWorker::~PassiveModelWorker() {}
-void PassiveModelWorker::ScheduleWork(base::OnceClosure work) {
- std::move(work).Run();
+SyncerError PassiveModelWorker::DoWorkAndWaitUntilDoneImpl(
+ const WorkCallback& work) {
+ // Simply do the work on the current thread.
+ return work.Run();
}
ModelSafeGroup PassiveModelWorker::GetModelSafeGroup() {
« no previous file with comments | « components/sync/engine/passive_model_worker.h ('k') | components/sync/engine/ui_model_worker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698