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

Unified Diff: jingle/glue/pseudotcp_adapter_unittest.cc

Issue 8551004: base::Bind: Convert jingle/. (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
« no previous file with comments | « jingle/glue/fake_socket_factory.cc ('k') | jingle/glue/thread_wrapper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: jingle/glue/pseudotcp_adapter_unittest.cc
diff --git a/jingle/glue/pseudotcp_adapter_unittest.cc b/jingle/glue/pseudotcp_adapter_unittest.cc
index d418826023fb3f5588360784b3ef8448f2336ac6..65d7a5651660fb2f05b33af345f3349acce700ce 100644
--- a/jingle/glue/pseudotcp_adapter_unittest.cc
+++ b/jingle/glue/pseudotcp_adapter_unittest.cc
@@ -6,6 +6,8 @@
#include <vector>
+#include "base/bind.h"
+#include "base/bind_helpers.h"
#include "jingle/glue/thread_wrapper.h"
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
@@ -21,8 +23,6 @@ class FakeSocket;
} // namespace
} // namespace jingle_glue
-DISABLE_RUNNABLE_METHOD_REFCOUNT(jingle_glue::FakeSocket);
-
namespace jingle_glue {
namespace {
@@ -136,9 +136,12 @@ class FakeSocket : public net::Socket {
net::OldCompletionCallback* callback) OVERRIDE {
DCHECK(buf);
if (peer_socket_) {
- MessageLoop::current()->PostDelayedTask(FROM_HERE, NewRunnableMethod(
- peer_socket_, &FakeSocket::AppendInputPacket,
- std::vector<char>(buf->data(), buf->data() + buf_len)), latency_ms_);
+ MessageLoop::current()->PostDelayedTask(
+ FROM_HERE,
+ base::Bind(&FakeSocket::AppendInputPacket,
+ base::Unretained(peer_socket_),
+ std::vector<char>(buf->data(), buf->data() + buf_len)),
+ latency_ms_);
}
return buf_len;
@@ -186,7 +189,7 @@ class TCPChannelTester : public base::RefCountedThreadSafe<TCPChannelTester> {
void Start() {
message_loop_->PostTask(
- FROM_HERE, NewRunnableMethod(this, &TCPChannelTester::DoStart));
+ FROM_HERE, base::Bind(&TCPChannelTester::DoStart, this));
}
void CheckResults() {
« no previous file with comments | « jingle/glue/fake_socket_factory.cc ('k') | jingle/glue/thread_wrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698