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

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: formatting 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
« no previous file with comments | « chrome/browser/sync/glue/http_bridge_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..9ca6592f411d6d927060426e75a8684b184c3d3a 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,12 @@ 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 +176,7 @@ 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,9 +376,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();
« no previous file with comments | « chrome/browser/sync/glue/http_bridge_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698