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

Unified Diff: components/sync/engine/browser_thread_model_worker_unittest.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/engine/browser_thread_model_worker.cc ('k') | components/sync/engine/model_safe_worker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/engine/browser_thread_model_worker_unittest.cc
diff --git a/components/sync/engine/browser_thread_model_worker_unittest.cc b/components/sync/engine/browser_thread_model_worker_unittest.cc
index f4417e9b74eed91e37e636e9cfa0cb1c00e74df1..98900e63521dc71421e8a6f279763c8f144af104 100644
--- a/components/sync/engine/browser_thread_model_worker_unittest.cc
+++ b/components/sync/engine/browser_thread_model_worker_unittest.cc
@@ -39,11 +39,10 @@ class SyncBrowserThreadModelWorkerTest : public testing::Test {
// DoWork hasn't executed within action_timeout().
void ScheduleWork() {
// We wait until the callback is done. So it is safe to use unretained.
- WorkCallback c = base::Bind(&SyncBrowserThreadModelWorkerTest::DoWork,
- base::Unretained(this));
timer()->Start(FROM_HERE, TestTimeouts::action_timeout(), this,
&SyncBrowserThreadModelWorkerTest::Timeout);
- worker()->DoWorkAndWaitUntilDone(c);
+ worker()->DoWorkAndWaitUntilDone(base::BindOnce(
+ &SyncBrowserThreadModelWorkerTest::DoWork, base::Unretained(this)));
}
// This is the work that will be scheduled to be done on the DB thread.
« no previous file with comments | « components/sync/engine/browser_thread_model_worker.cc ('k') | components/sync/engine/model_safe_worker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698