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

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

Issue 8726001: Converted remaining non-factory NewRunnable* calls to use base::Bind (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed a bad argument list 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/glue/non_frontend_data_type_controller_unittest.cc
diff --git a/chrome/browser/sync/glue/non_frontend_data_type_controller_unittest.cc b/chrome/browser/sync/glue/non_frontend_data_type_controller_unittest.cc
index 145f6e36afc8919e1b4402e63e27a9fed4ebb15a..0de3a08e43679b45dec64e3269e6d57acf56386d 100644
--- a/chrome/browser/sync/glue/non_frontend_data_type_controller_unittest.cc
+++ b/chrome/browser/sync/glue/non_frontend_data_type_controller_unittest.cc
@@ -72,16 +72,16 @@ class NonFrontendDataTypeControllerFake : public NonFrontendDataTypeController {
virtual bool StartAssociationAsync() {
mock_->StartAssociationAsync();
return BrowserThread::PostTask(BrowserThread::DB, FROM_HERE,
- NewRunnableMethod(
- this,
- &NonFrontendDataTypeControllerFake::StartAssociation));
+ base::Bind(
+ &NonFrontendDataTypeControllerFake::StartAssociation,
+ this));
akalin 2011/11/29 17:35:01 this might now fit on previous line
Rick Campbell 2011/11/30 18:37:22 Done.
}
virtual bool StopAssociationAsync() {
mock_->StopAssociationAsync();
return BrowserThread::PostTask(BrowserThread::DB, FROM_HERE,
- NewRunnableMethod(
- this,
- &NonFrontendDataTypeControllerFake::StopAssociation));
+ base::Bind(
+ &NonFrontendDataTypeControllerFake::StopAssociation,
+ this));
akalin 2011/11/29 17:35:01 this might now fit on previous line
Rick Campbell 2011/11/30 18:37:22 Done.
}
// We mock the following methods because their default implementations do
@@ -180,8 +180,8 @@ class NonFrontendDataTypeControllerTest : public testing::Test {
void WaitForDTC() {
WaitableEvent done(true, false);
BrowserThread::PostTask(BrowserThread::DB, FROM_HERE,
- NewRunnableFunction(&NonFrontendDataTypeControllerTest::SignalDone,
- &done));
+ base::Bind(&NonFrontendDataTypeControllerTest::SignalDone,
+ &done));
akalin 2011/11/29 17:35:01 this might now fit on previous line
Rick Campbell 2011/11/30 18:37:22 Done.
done.TimedWait(base::TimeDelta::FromMilliseconds(
TestTimeouts::action_timeout_ms()));
if (!done.IsSignaled()) {
@@ -381,9 +381,9 @@ TEST_F(NonFrontendDataTypeControllerTest, OnUnrecoverableError) {
EXPECT_EQ(DataTypeController::RUNNING, non_frontend_dtc_->state());
// This should cause non_frontend_dtc_->Stop() to be called.
BrowserThread::PostTask(BrowserThread::DB, FROM_HERE,
- NewRunnableMethod(
- non_frontend_dtc_.get(),
+ base::Bind(
&NonFrontendDataTypeControllerFake::OnUnrecoverableError,
+ non_frontend_dtc_.get(),
FROM_HERE,
std::string("Test")));
WaitForDTC();

Powered by Google App Engine
This is Rietveld 408576698