summaryrefslogtreecommitdiffstats
path: root/base/memory/weak_ptr_unittest.cc
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-01 02:14:47 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-01 02:14:47 +0000
commit8f5a7e49df055f720d398e659d8f0fd1bb532ad0 (patch)
tree0cf8bfd736484a794b2d9c4127f53784ee5cdeea /base/memory/weak_ptr_unittest.cc
parentf182444916248f4d0612fada91b49ee672573d85 (diff)
downloadchromium_src-8f5a7e49df055f720d398e659d8f0fd1bb532ad0.zip
chromium_src-8f5a7e49df055f720d398e659d8f0fd1bb532ad0.tar.gz
chromium_src-8f5a7e49df055f720d398e659d8f0fd1bb532ad0.tar.bz2
base::Bind: Remove NewRunnableFunction.
BUG=none TEST=none R=groby,ajwong Review URL: http://codereview.chromium.org/8960011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116072 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/memory/weak_ptr_unittest.cc')
-rw-r--r--base/memory/weak_ptr_unittest.cc28
1 files changed, 9 insertions, 19 deletions
diff --git a/base/memory/weak_ptr_unittest.cc b/base/memory/weak_ptr_unittest.cc
index f9f8b3e..4b73d17 100644
--- a/base/memory/weak_ptr_unittest.cc
+++ b/base/memory/weak_ptr_unittest.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/bind.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -22,7 +23,7 @@ class OffThreadObjectCreator {
creator_thread.Start();
creator_thread.message_loop()->PostTask(
FROM_HERE,
- NewRunnableFunction(OffThreadObjectCreator::CreateObject, &result));
+ base::Bind(OffThreadObjectCreator::CreateObject, &result));
}
DCHECK(result); // We synchronized on thread destruction above.
return result;
@@ -55,10 +56,8 @@ class BackgroundThread : public Thread {
WaitableEvent completion(true, false);
message_loop()->PostTask(
FROM_HERE,
- NewRunnableFunction(&BackgroundThread::DoCreateFromProducer,
- consumer,
- producer,
- &completion));
+ base::Bind(&BackgroundThread::DoCreateFromProducer, consumer, producer,
+ &completion));
completion.Wait();
}
@@ -66,10 +65,8 @@ class BackgroundThread : public Thread {
WaitableEvent completion(true, false);
message_loop()->PostTask(
FROM_HERE,
- NewRunnableFunction(&BackgroundThread::DoCreateFromConsumer,
- consumer,
- other,
- &completion));
+ base::Bind(&BackgroundThread::DoCreateFromConsumer, consumer, other,
+ &completion));
completion.Wait();
}
@@ -77,9 +74,7 @@ class BackgroundThread : public Thread {
WaitableEvent completion(true, false);
message_loop()->PostTask(
FROM_HERE,
- NewRunnableFunction(&BackgroundThread::DoDeleteProducer,
- object,
- &completion));
+ base::Bind(&BackgroundThread::DoDeleteProducer, object, &completion));
completion.Wait();
}
@@ -87,9 +82,7 @@ class BackgroundThread : public Thread {
WaitableEvent completion(true, false);
message_loop()->PostTask(
FROM_HERE,
- NewRunnableFunction(&BackgroundThread::DoDeleteConsumer,
- object,
- &completion));
+ base::Bind(&BackgroundThread::DoDeleteConsumer, object, &completion));
completion.Wait();
}
@@ -98,10 +91,7 @@ class BackgroundThread : public Thread {
Producer* result = NULL;
message_loop()->PostTask(
FROM_HERE,
- NewRunnableFunction(&BackgroundThread::DoDeRef,
- consumer,
- &result,
- &completion));
+ base::Bind(&BackgroundThread::DoDeRef, consumer, &result, &completion));
completion.Wait();
return result;
}