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

Side by Side Diff: net/socket/tcp_pinger.h

Issue 344026: Add LoadLog to ClientSocket::Connect(). (Closed)
Patch Set: Minor build fixups and fixed mac bug. Created 11 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 unified diff | Download patch
« no previous file with comments | « net/socket/tcp_client_socket_win.cc ('k') | net/socket_stream/socket_stream.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_SOCKET_TCP_PINGER_H_ 5 #ifndef NET_SOCKET_TCP_PINGER_H_
6 #define NET_SOCKET_TCP_PINGER_H_ 6 #define NET_SOCKET_TCP_PINGER_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/ref_counted.h" 9 #include "base/ref_counted.h"
10 #include "base/scoped_ptr.h" 10 #include "base/scoped_ptr.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 explicit Worker(const net::AddressList& addr) 79 explicit Worker(const net::AddressList& addr)
80 : event_(false, false), 80 : event_(false, false),
81 net_error_(ERR_IO_PENDING), 81 net_error_(ERR_IO_PENDING),
82 addr_(addr), 82 addr_(addr),
83 ALLOW_THIS_IN_INITIALIZER_LIST(connect_callback_(this, 83 ALLOW_THIS_IN_INITIALIZER_LIST(connect_callback_(this,
84 &net::TCPPinger::Worker::ConnectDone)) { 84 &net::TCPPinger::Worker::ConnectDone)) {
85 } 85 }
86 86
87 void DoConnect() { 87 void DoConnect() {
88 sock_.reset(new TCPClientSocket(addr_)); 88 sock_.reset(new TCPClientSocket(addr_));
89 int rv = sock_->Connect(&connect_callback_); 89 int rv = sock_->Connect(&connect_callback_, NULL);
90 // Regardless of success or failure, if we're done now, 90 // Regardless of success or failure, if we're done now,
91 // signal the customer. 91 // signal the customer.
92 if (rv != ERR_IO_PENDING) 92 if (rv != ERR_IO_PENDING)
93 ConnectDone(rv); 93 ConnectDone(rv);
94 } 94 }
95 95
96 void DoDisconnect() { 96 void DoDisconnect() {
97 sock_.reset(); 97 sock_.reset();
98 event_.Signal(); 98 event_.Signal();
99 } 99 }
(...skipping 23 matching lines...) Expand all
123 }; 123 };
124 124
125 base::Thread io_thread_; 125 base::Thread io_thread_;
126 Worker* worker_; 126 Worker* worker_;
127 DISALLOW_COPY_AND_ASSIGN(TCPPinger); 127 DISALLOW_COPY_AND_ASSIGN(TCPPinger);
128 }; 128 };
129 129
130 } // namespace net 130 } // namespace net
131 131
132 #endif // NET_SOCKET_TCP_PINGER_H_ 132 #endif // NET_SOCKET_TCP_PINGER_H_
OLDNEW
« no previous file with comments | « net/socket/tcp_client_socket_win.cc ('k') | net/socket_stream/socket_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698