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

Unified Diff: chrome/browser/sync/glue/database_model_worker_unittest.cc

Issue 557029: Fix leak in DatabaseWorkerModelTest. (Closed)
Patch Set: Created 10 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/glue/database_model_worker_unittest.cc
diff --git a/chrome/browser/sync/glue/database_model_worker_unittest.cc b/chrome/browser/sync/glue/database_model_worker_unittest.cc
index 81c8e6730dc3f64b2d2aa1eadc54330fabe596e4..69ad5cead910ec4e6eee8f98e1b521f45d3e6a1e 100644
--- a/chrome/browser/sync/glue/database_model_worker_unittest.cc
+++ b/chrome/browser/sync/glue/database_model_worker_unittest.cc
@@ -34,10 +34,10 @@ class DatabaseModelWorkerTest : public testing::Test {
// Schedule DoWork to be executed on the DB thread and have the test fail if
// DoWork hasn't executed within 10 seconds.
void ScheduleWork() {
+ scoped_ptr<Closure> c(NewCallback(this, &DatabaseModelWorkerTest::DoWork));
timer()->Start(TimeDelta::FromSeconds(10),
this, &DatabaseModelWorkerTest::Timeout);
- worker()->DoWorkAndWaitUntilDone(
- NewCallback(this, &DatabaseModelWorkerTest::DoWork));
+ worker()->DoWorkAndWaitUntilDone(c.get());
}
// This is the work that will be scheduled to be done on the DB thread.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698