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

Unified Diff: net/socket/tcp_client_socket_libevent.h

Issue 8801004: base::Bind: Convert StreamSocket::Connect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Build 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
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 2a6b041c6fd2ac652e944293c6da8e71b6c8e6ec..90c3fbf35b560791287fea7eacebd174c77e4973 100644
--- a/net/socket/tcp_client_socket_libevent.h
+++ b/net/socket/tcp_client_socket_libevent.h
@@ -42,8 +42,9 @@ class NET_EXPORT_PRIVATE TCPClientSocketLibevent : public StreamSocket,
// Binds the socket to a local IP address and port.
int Bind(const IPEndPoint& address);
- // StreamSocket methods:
+ // StreamSocket implementation.
virtual int Connect(OldCompletionCallback* callback) OVERRIDE;
+ virtual int Connect(const CompletionCallback& callback) OVERRIDE;
virtual void Disconnect() OVERRIDE;
virtual bool IsConnected() const OVERRIDE;
virtual bool IsConnectedAndIdle() const OVERRIDE;
@@ -57,7 +58,7 @@ class NET_EXPORT_PRIVATE TCPClientSocketLibevent : public StreamSocket,
virtual int64 NumBytesRead() const OVERRIDE;
virtual base::TimeDelta GetConnectTimeMicros() const OVERRIDE;
- // Socket methods:
+ // Socket implementation.
// Multiple outstanding requests are not supported.
// Full duplex mode (reading and writing at the same time) is supported
virtual int Read(IOBuffer* buf,
@@ -107,7 +108,7 @@ class NET_EXPORT_PRIVATE TCPClientSocketLibevent : public StreamSocket,
virtual void OnFileCanWriteWithoutBlocking(int /* fd */) OVERRIDE {
if (socket_->waiting_connect()) {
socket_->DidCompleteConnect();
- } else if (socket_->write_callback_) {
+ } else if (socket_->old_write_callback_) {
csilv 2011/12/06 21:03:18 seems like we should also check write_callback?
James Hawkins 2011/12/06 22:19:30 Done.
socket_->DidCompleteWrite();
}
}
@@ -179,7 +180,8 @@ class NET_EXPORT_PRIVATE TCPClientSocketLibevent : public StreamSocket,
OldCompletionCallback* read_callback_;
// External callback; called when write is complete.
- OldCompletionCallback* write_callback_;
+ OldCompletionCallback* old_write_callback_;
+ CompletionCallback write_callback_;
// The next state for the Connect() state machine.
ConnectState next_connect_state_;

Powered by Google App Engine
This is Rietveld 408576698