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

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: 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..8c88c9b0f2f5f4549e50d9169211d7103e88ac61 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));
}
virtual bool StopAssociationAsync() {
mock_->StopAssociationAsync();
return BrowserThread::PostTask(BrowserThread::DB, FROM_HERE,
- NewRunnableMethod(
- this,
- &NonFrontendDataTypeControllerFake::StopAssociation));
+ base::Bind(
+ &NonFrontendDataTypeControllerFake::StopAssociation,
+ this));
}
// 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));
done.TimedWait(base::TimeDelta::FromMilliseconds(
TestTimeouts::action_timeout_ms()));
if (!done.IsSignaled()) {
@@ -381,11 +381,11 @@ 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,
FROM_HERE,
- std::string("Test")));
+ std::string("Test")),
+ non_frontend_dtc_.get());
rlarocque 2011/11/28 19:51:03 non_frontend_dtc_.get() is the "this" argument, ri
akalin 2011/11/28 20:28:39 Yeah, how did this compile?
Rick Campbell 2011/11/29 17:26:13 Yeah, it didn't. It was a one-last-change thing,
WaitForDTC();
EXPECT_EQ(DataTypeController::NOT_RUNNING, non_frontend_dtc_->state());
}

Powered by Google App Engine
This is Rietveld 408576698