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

Unified Diff: components/sync/test/engine/fake_model_worker.cc

Issue 2782573002: [Sync] Refactor ModelSafeWorker::DoWorkAndWaitUntilDone() to avoid code duplication. (Closed)
Patch Set: self-review 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/test/engine/fake_model_worker.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/test/engine/fake_model_worker.cc
diff --git a/components/sync/test/engine/fake_model_worker.cc b/components/sync/test/engine/fake_model_worker.cc
index c696005097602c6f52fb85739328138701729aca..966e0a4f5a1d3b298d6fc867aef6bf012f4ccd10 100644
--- a/components/sync/test/engine/fake_model_worker.cc
+++ b/components/sync/test/engine/fake_model_worker.cc
@@ -4,7 +4,7 @@
#include "components/sync/test/engine/fake_model_worker.h"
-#include "base/callback.h"
+#include <utility>
namespace syncer {
@@ -18,11 +18,10 @@ FakeModelWorker::~FakeModelWorker() {
DCHECK(thread_checker_.CalledOnValidThread());
}
-SyncerError FakeModelWorker::DoWorkAndWaitUntilDoneImpl(
- const WorkCallback& work) {
+void FakeModelWorker::ScheduleWork(base::OnceClosure work) {
DCHECK(thread_checker_.CalledOnValidThread());
// Simply do the work on the current thread.
- return work.Run();
+ std::move(work).Run();
}
ModelSafeGroup FakeModelWorker::GetModelSafeGroup() {
« no previous file with comments | « components/sync/test/engine/fake_model_worker.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698