From 2a848e0e4d75cd9195d15ff955014397482f9faa Mon Sep 17 00:00:00 2001 From: "hans@chromium.org" Date: Thu, 9 Aug 2012 22:27:31 +0000 Subject: Clean-up inline members of nested classes (net/) Due to a bug, the Clang-plugin style checker failed to warn about inline constructors, destructors, non-empty virtual methods, etc. for nested classes. The plugin has been fixed, and this patch is part of a clean-up of all the code that now causes the plugin to issue errors. BUG=139346 Review URL: https://chromiumcodereview.appspot.com/10854063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150917 0039d316-1c4b-4281-b951-d872f2087c98 --- net/socket/tcp_client_socket_libevent.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'net/socket/tcp_client_socket_libevent.cc') diff --git a/net/socket/tcp_client_socket_libevent.cc b/net/socket/tcp_client_socket_libevent.cc index a3727ff..bd31cbe 100644 --- a/net/socket/tcp_client_socket_libevent.cc +++ b/net/socket/tcp_client_socket_libevent.cc @@ -579,6 +579,19 @@ bool TCPClientSocketLibevent::SetNoDelay(bool no_delay) { return SetTCPNoDelay(socket, no_delay); } +void TCPClientSocketLibevent::ReadWatcher::OnFileCanReadWithoutBlocking(int) { + if (!socket_->read_callback_.is_null()) + socket_->DidCompleteRead(); +} + +void TCPClientSocketLibevent::WriteWatcher::OnFileCanWriteWithoutBlocking(int) { + if (socket_->waiting_connect()) { + socket_->DidCompleteConnect(); + } else if (!socket_->write_callback_.is_null()) { + socket_->DidCompleteWrite(); + } +} + void TCPClientSocketLibevent::LogConnectCompletion(int net_error) { if (net_error == OK) UpdateConnectionTypeHistograms(CONNECTION_ANY); -- cgit v1.1