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

Unified Diff: net/socket/tcp_client_socket_libevent.h

Issue 8801005: base::Bind: Convert Socket::Read. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes. Created 9 years 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 | « net/socket/ssl_server_socket_unittest.cc ('k') | net/socket/tcp_client_socket_libevent.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/tcp_client_socket_libevent.h
diff --git a/net/socket/tcp_client_socket_libevent.h b/net/socket/tcp_client_socket_libevent.h
index ac73f2c637d4cf8f3a281866668f092634ff5cd0..47f19a0cbb35598211fe59be5015834cb78d3e7a 100644
--- a/net/socket/tcp_client_socket_libevent.h
+++ b/net/socket/tcp_client_socket_libevent.h
@@ -64,6 +64,9 @@ class NET_EXPORT_PRIVATE TCPClientSocketLibevent : public StreamSocket,
virtual int Read(IOBuffer* buf,
int buf_len,
OldCompletionCallback* callback) OVERRIDE;
+ virtual int Read(IOBuffer* buf,
+ int buf_len,
+ const CompletionCallback& callback) OVERRIDE;
virtual int Write(IOBuffer* buf,
int buf_len,
OldCompletionCallback* callback) OVERRIDE;
@@ -85,7 +88,7 @@ class NET_EXPORT_PRIVATE TCPClientSocketLibevent : public StreamSocket,
// MessageLoopForIO::Watcher methods
virtual void OnFileCanReadWithoutBlocking(int /* fd */) OVERRIDE {
- if (socket_->read_callback_)
+ if (socket_->old_read_callback_)
socket_->DidCompleteRead();
}
@@ -176,7 +179,8 @@ class NET_EXPORT_PRIVATE TCPClientSocketLibevent : public StreamSocket,
int write_buf_len_;
// External callback; called when read is complete.
- OldCompletionCallback* read_callback_;
+ OldCompletionCallback* old_read_callback_;
+ CompletionCallback read_callback_;
// External callback; called when write is complete.
OldCompletionCallback* old_write_callback_;
« no previous file with comments | « net/socket/ssl_server_socket_unittest.cc ('k') | net/socket/tcp_client_socket_libevent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698