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

Unified Diff: base/memory/weak_ptr_unittest.cc

Issue 8960011: base::Bind: Remove NewRunnableFunction. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Lame TODO. Created 8 years, 12 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 | « base/callback.h.pump ('k') | base/message_loop_proxy_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/weak_ptr_unittest.cc
diff --git a/base/memory/weak_ptr_unittest.cc b/base/memory/weak_ptr_unittest.cc
index f9f8b3e916a27bcbfaf7a72a28ae311b9ac08313..4b73d1791646b176254147dc4c8ac3aceb479255 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;
}
« no previous file with comments | « base/callback.h.pump ('k') | base/message_loop_proxy_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698