| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "jingle/glue/proxy_resolving_client_socket.h" | 5 #include "jingle/glue/proxy_resolving_client_socket.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 base::Bind(&ProxyResolvingClientSocket::ProcessProxyResolveDone, | 302 base::Bind(&ProxyResolvingClientSocket::ProcessProxyResolveDone, |
| 303 weak_factory_.GetWeakPtr(), rv)); | 303 weak_factory_.GetWeakPtr(), rv)); |
| 304 // Since we potentially have another try to go (trying the direct connect) | 304 // Since we potentially have another try to go (trying the direct connect) |
| 305 // set the return code code to ERR_IO_PENDING. | 305 // set the return code code to ERR_IO_PENDING. |
| 306 rv = net::ERR_IO_PENDING; | 306 rv = net::ERR_IO_PENDING; |
| 307 } | 307 } |
| 308 return rv; | 308 return rv; |
| 309 } | 309 } |
| 310 | 310 |
| 311 void ProxyResolvingClientSocket::ReportSuccessfulProxyConnection() { | 311 void ProxyResolvingClientSocket::ReportSuccessfulProxyConnection() { |
| 312 network_session_->proxy_service()->ReportSuccess(proxy_info_); | 312 network_session_->proxy_service()->ReportSuccess(proxy_info_, NULL); |
| 313 } | 313 } |
| 314 | 314 |
| 315 void ProxyResolvingClientSocket::Disconnect() { | 315 void ProxyResolvingClientSocket::Disconnect() { |
| 316 CloseTransportSocket(); | 316 CloseTransportSocket(); |
| 317 if (pac_request_) { | 317 if (pac_request_) { |
| 318 network_session_->proxy_service()->CancelPacRequest(pac_request_); | 318 network_session_->proxy_service()->CancelPacRequest(pac_request_); |
| 319 pac_request_ = NULL; | 319 pac_request_ = NULL; |
| 320 } | 320 } |
| 321 user_connect_callback_.Reset(); | 321 user_connect_callback_.Reset(); |
| 322 } | 322 } |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 return false; | 399 return false; |
| 400 } | 400 } |
| 401 | 401 |
| 402 void ProxyResolvingClientSocket::CloseTransportSocket() { | 402 void ProxyResolvingClientSocket::CloseTransportSocket() { |
| 403 if (transport_.get() && transport_->socket()) | 403 if (transport_.get() && transport_->socket()) |
| 404 transport_->socket()->Disconnect(); | 404 transport_->socket()->Disconnect(); |
| 405 transport_.reset(); | 405 transport_.reset(); |
| 406 } | 406 } |
| 407 | 407 |
| 408 } // namespace jingle_glue | 408 } // namespace jingle_glue |
| OLD | NEW |