| Index: net/socket/socks_client_socket.cc
|
| diff --git a/net/socket/socks_client_socket.cc b/net/socket/socks_client_socket.cc
|
| index e5049ff1d2fef4a335f459e21b14763bb858284a..ec510996cce309eb1e496de6fee72a6effe3a4f1 100644
|
| --- a/net/socket/socks_client_socket.cc
|
| +++ b/net/socket/socks_client_socket.cc
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2009 The Chromium Authors. All rights reserved.
|
| +// Copyright (c) 2010 The Chromium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| @@ -73,7 +73,8 @@ SOCKSClientSocket::SOCKSClientSocket(ClientSocketHandle* transport_socket,
|
| bytes_sent_(0),
|
| bytes_received_(0),
|
| host_resolver_(host_resolver),
|
| - host_request_info_(req_info) {
|
| + host_request_info_(req_info),
|
| + net_log_(transport_socket->socket()->NetLog()) {
|
| }
|
|
|
| SOCKSClientSocket::SOCKSClientSocket(ClientSocket* transport_socket,
|
| @@ -89,7 +90,8 @@ SOCKSClientSocket::SOCKSClientSocket(ClientSocket* transport_socket,
|
| bytes_sent_(0),
|
| bytes_received_(0),
|
| host_resolver_(host_resolver),
|
| - host_request_info_(req_info) {
|
| + host_request_info_(req_info),
|
| + net_log_(transport_socket->NetLog()) {
|
| transport_->set_socket(transport_socket);
|
| }
|
|
|
| @@ -97,8 +99,7 @@ SOCKSClientSocket::~SOCKSClientSocket() {
|
| Disconnect();
|
| }
|
|
|
| -int SOCKSClientSocket::Connect(CompletionCallback* callback,
|
| - const BoundNetLog& net_log) {
|
| +int SOCKSClientSocket::Connect(CompletionCallback* callback) {
|
| DCHECK(transport_.get());
|
| DCHECK(transport_->socket());
|
| DCHECK(transport_->socket()->IsConnected());
|
| @@ -110,16 +111,14 @@ int SOCKSClientSocket::Connect(CompletionCallback* callback,
|
| return OK;
|
|
|
| next_state_ = STATE_RESOLVE_HOST;
|
| - net_log_ = net_log;
|
|
|
| - net_log.BeginEvent(NetLog::TYPE_SOCKS_CONNECT);
|
| + net_log_.BeginEvent(NetLog::TYPE_SOCKS_CONNECT);
|
|
|
| int rv = DoLoop(OK);
|
| if (rv == ERR_IO_PENDING) {
|
| user_callback_ = callback;
|
| } else {
|
| - net_log.EndEvent(NetLog::TYPE_SOCKS_CONNECT);
|
| - net_log_ = BoundNetLog();
|
| + net_log_.EndEvent(NetLog::TYPE_SOCKS_CONNECT);
|
| }
|
| return rv;
|
| }
|
| @@ -133,7 +132,6 @@ void SOCKSClientSocket::Disconnect() {
|
| // These are the states initialized by Connect().
|
| next_state_ = STATE_NONE;
|
| user_callback_ = NULL;
|
| - net_log_ = BoundNetLog();
|
| }
|
|
|
| bool SOCKSClientSocket::IsConnected() const {
|
| @@ -191,7 +189,6 @@ void SOCKSClientSocket::OnIOComplete(int result) {
|
| int rv = DoLoop(result);
|
| if (rv != ERR_IO_PENDING) {
|
| net_log_.EndEvent(NetLog::TYPE_SOCKS_CONNECT);
|
| - net_log_ = BoundNetLog();
|
| DoCallback(rv);
|
| }
|
| }
|
|
|