| 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 <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "net/base/io_buffer.h" | 13 #include "net/base/io_buffer.h" |
| 14 #include "net/base/load_flags.h" | 14 #include "net/base/load_flags.h" |
| 15 #include "net/base/net_errors.h" | 15 #include "net/base/net_errors.h" |
| 16 #include "net/base/trusted_spdy_proxy_provider.h" |
| 16 #include "net/http/http_auth_controller.h" | 17 #include "net/http/http_auth_controller.h" |
| 17 #include "net/http/http_network_session.h" | 18 #include "net/http/http_network_session.h" |
| 18 #include "net/http/proxy_client_socket.h" | 19 #include "net/http/proxy_client_socket.h" |
| 19 #include "net/socket/client_socket_handle.h" | 20 #include "net/socket/client_socket_handle.h" |
| 20 #include "net/socket/client_socket_pool_manager.h" | 21 #include "net/socket/client_socket_pool_manager.h" |
| 21 #include "net/url_request/url_request_context.h" | 22 #include "net/url_request/url_request_context.h" |
| 22 #include "net/url_request/url_request_context_getter.h" | 23 #include "net/url_request/url_request_context_getter.h" |
| 23 | 24 |
| 24 namespace jingle_glue { | 25 namespace jingle_glue { |
| 25 | 26 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 // TODO(mmenke): Just copying specific parameters seems highly regression | 78 // TODO(mmenke): Just copying specific parameters seems highly regression |
| 78 // prone. Should have a better way to do this. | 79 // prone. Should have a better way to do this. |
| 79 session_params.host_mapping_rules = reference_params->host_mapping_rules; | 80 session_params.host_mapping_rules = reference_params->host_mapping_rules; |
| 80 session_params.ignore_certificate_errors = | 81 session_params.ignore_certificate_errors = |
| 81 reference_params->ignore_certificate_errors; | 82 reference_params->ignore_certificate_errors; |
| 82 session_params.testing_fixed_http_port = | 83 session_params.testing_fixed_http_port = |
| 83 reference_params->testing_fixed_http_port; | 84 reference_params->testing_fixed_http_port; |
| 84 session_params.testing_fixed_https_port = | 85 session_params.testing_fixed_https_port = |
| 85 reference_params->testing_fixed_https_port; | 86 reference_params->testing_fixed_https_port; |
| 86 session_params.next_protos = reference_params->next_protos; | 87 session_params.next_protos = reference_params->next_protos; |
| 87 session_params.trusted_spdy_proxy = reference_params->trusted_spdy_proxy; | 88 session_params.trusted_spdy_proxy_provider = |
| 89 reference_params->trusted_spdy_proxy_provider; |
| 88 session_params.forced_spdy_exclusions = | 90 session_params.forced_spdy_exclusions = |
| 89 reference_params->forced_spdy_exclusions; | 91 reference_params->forced_spdy_exclusions; |
| 90 session_params.use_alternative_services = | 92 session_params.use_alternative_services = |
| 91 reference_params->use_alternative_services; | 93 reference_params->use_alternative_services; |
| 92 } | 94 } |
| 93 | 95 |
| 94 network_session_.reset(new net::HttpNetworkSession(session_params)); | 96 network_session_.reset(new net::HttpNetworkSession(session_params)); |
| 95 } | 97 } |
| 96 | 98 |
| 97 ProxyResolvingClientSocket::~ProxyResolvingClientSocket() { | 99 ProxyResolvingClientSocket::~ProxyResolvingClientSocket() { |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 return 0; | 433 return 0; |
| 432 } | 434 } |
| 433 | 435 |
| 434 void ProxyResolvingClientSocket::CloseTransportSocket() { | 436 void ProxyResolvingClientSocket::CloseTransportSocket() { |
| 435 if (transport_.get() && transport_->socket()) | 437 if (transport_.get() && transport_->socket()) |
| 436 transport_->socket()->Disconnect(); | 438 transport_->socket()->Disconnect(); |
| 437 transport_.reset(); | 439 transport_.reset(); |
| 438 } | 440 } |
| 439 | 441 |
| 440 } // namespace jingle_glue | 442 } // namespace jingle_glue |
| OLD | NEW |