| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/time.h" | 10 #include "base/time.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 NULL); | 89 NULL); |
| 90 } | 90 } |
| 91 | 91 |
| 92 scoped_refptr<SSLSocketParams> SSLParams(ProxyServer::Scheme proxy, | 92 scoped_refptr<SSLSocketParams> SSLParams(ProxyServer::Scheme proxy, |
| 93 bool want_spdy_over_npn) { | 93 bool want_spdy_over_npn) { |
| 94 return make_scoped_refptr(new SSLSocketParams( | 94 return make_scoped_refptr(new SSLSocketParams( |
| 95 proxy == ProxyServer::SCHEME_DIRECT ? direct_tcp_socket_params_ : NULL, | 95 proxy == ProxyServer::SCHEME_DIRECT ? direct_tcp_socket_params_ : NULL, |
| 96 proxy == ProxyServer::SCHEME_HTTP ? http_proxy_socket_params_ : NULL, | 96 proxy == ProxyServer::SCHEME_HTTP ? http_proxy_socket_params_ : NULL, |
| 97 proxy == ProxyServer::SCHEME_SOCKS5 ? socks_socket_params_ : NULL, | 97 proxy == ProxyServer::SCHEME_SOCKS5 ? socks_socket_params_ : NULL, |
| 98 proxy, | 98 proxy, |
| 99 "host", | 99 HostPortPair("host", 443), |
| 100 ssl_config_, | 100 ssl_config_, |
| 101 0, | 101 0, |
| 102 false, | 102 false, |
| 103 want_spdy_over_npn)); | 103 want_spdy_over_npn)); |
| 104 } | 104 } |
| 105 | 105 |
| 106 void AddAuthToCache() { | 106 void AddAuthToCache() { |
| 107 const string16 kFoo(ASCIIToUTF16("foo")); | 107 const string16 kFoo(ASCIIToUTF16("foo")); |
| 108 const string16 kBar(ASCIIToUTF16("bar")); | 108 const string16 kBar(ASCIIToUTF16("bar")); |
| 109 session_->auth_cache()->Add(GURL("http://proxy:443/"), "MyRealm1", "Basic", | 109 session_->auth_cache()->Add(GURL("http://proxy:443/"), "MyRealm1", "Basic", |
| (...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 590 handle.release_pending_http_proxy_connection()); | 590 handle.release_pending_http_proxy_connection()); |
| 591 EXPECT_TRUE(tunnel_handle->socket()); | 591 EXPECT_TRUE(tunnel_handle->socket()); |
| 592 EXPECT_FALSE(tunnel_handle->socket()->IsConnected()); | 592 EXPECT_FALSE(tunnel_handle->socket()->IsConnected()); |
| 593 } | 593 } |
| 594 | 594 |
| 595 // It would be nice to also test the timeouts in SSLClientSocketPool. | 595 // It would be nice to also test the timeouts in SSLClientSocketPool. |
| 596 | 596 |
| 597 } // namespace | 597 } // namespace |
| 598 | 598 |
| 599 } // namespace net | 599 } // namespace net |
| OLD | NEW |