| 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 "net/http/http_proxy_client_socket_pool.h" | 5 #include "net/http/http_proxy_client_socket_pool.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 socket_factory_.AddSSLSocketDataProvider(ssl_data_.get()); | 170 socket_factory_.AddSSLSocketDataProvider(ssl_data_.get()); |
| 171 } | 171 } |
| 172 } | 172 } |
| 173 | 173 |
| 174 void InitializeSpdySsl() { | 174 void InitializeSpdySsl() { |
| 175 spdy::SpdyFramer::set_enable_compression_default(false); | 175 spdy::SpdyFramer::set_enable_compression_default(false); |
| 176 ssl_data_->next_proto_status = SSLClientSocket::kNextProtoNegotiated; | 176 ssl_data_->next_proto_status = SSLClientSocket::kNextProtoNegotiated; |
| 177 ssl_data_->next_proto = "spdy/2.1"; | 177 ssl_data_->next_proto = "spdy/2.1"; |
| 178 ssl_data_->was_npn_negotiated = true; | 178 ssl_data_->was_npn_negotiated = true; |
| 179 ssl_data_->protocol_negotiated = SSLClientSocket::kProtoSPDY21; | 179 ssl_data_->protocol_negotiated = SSLClientSocket::kProtoSPDY21; |
| 180 HttpStreamFactory::set_supported_spdy_version(NPN_SPDY_21); |
| 180 } | 181 } |
| 181 | 182 |
| 182 HttpNetworkSession* CreateNetworkSession() { | 183 HttpNetworkSession* CreateNetworkSession() { |
| 183 HttpNetworkSession::Params params; | 184 HttpNetworkSession::Params params; |
| 184 params.host_resolver = &host_resolver_; | 185 params.host_resolver = &host_resolver_; |
| 185 params.cert_verifier = &cert_verifier_; | 186 params.cert_verifier = &cert_verifier_; |
| 186 params.proxy_service = proxy_service_.get(); | 187 params.proxy_service = proxy_service_.get(); |
| 187 params.client_socket_factory = &socket_factory_; | 188 params.client_socket_factory = &socket_factory_; |
| 188 params.ssl_config_service = ssl_config_service_; | 189 params.ssl_config_service = ssl_config_service_; |
| 189 params.http_auth_handler_factory = http_auth_handler_factory_.get(); | 190 params.http_auth_handler_factory = http_auth_handler_factory_.get(); |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 // HTTPS or SPDY Proxy CONNECT responses are trustworthy | 534 // HTTPS or SPDY Proxy CONNECT responses are trustworthy |
| 534 EXPECT_EQ(ERR_HTTPS_PROXY_TUNNEL_RESPONSE, rv); | 535 EXPECT_EQ(ERR_HTTPS_PROXY_TUNNEL_RESPONSE, rv); |
| 535 EXPECT_TRUE(handle_.is_initialized()); | 536 EXPECT_TRUE(handle_.is_initialized()); |
| 536 EXPECT_TRUE(handle_.socket()); | 537 EXPECT_TRUE(handle_.socket()); |
| 537 } | 538 } |
| 538 } | 539 } |
| 539 | 540 |
| 540 // It would be nice to also test the timeouts in HttpProxyClientSocketPool. | 541 // It would be nice to also test the timeouts in HttpProxyClientSocketPool. |
| 541 | 542 |
| 542 } // namespace net | 543 } // namespace net |
| OLD | NEW |