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

Unified Diff: net/socket/tcp_client_socket_libevent.cc

Issue 10854063: Clean-up inline members of nested classes (net/) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
Index: 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 a3727ff1b1d9de83e80d239b1d1454b7e5cd72bb..bd31cbebfcd16f1ec09b32d5447ddd95e3eed83c 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);

Powered by Google App Engine
This is Rietveld 408576698