| 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 HostPortPair("host", 443), | 122 HostPortPair("host", 443), |
| 123 ssl_config_, | 123 ssl_config_, |
| 124 0, | 124 0, |
| 125 false, | 125 false, |
| 126 want_spdy_over_npn)); | 126 want_spdy_over_npn)); |
| 127 } | 127 } |
| 128 | 128 |
| 129 void AddAuthToCache() { | 129 void AddAuthToCache() { |
| 130 const string16 kFoo(ASCIIToUTF16("foo")); | 130 const string16 kFoo(ASCIIToUTF16("foo")); |
| 131 const string16 kBar(ASCIIToUTF16("bar")); | 131 const string16 kBar(ASCIIToUTF16("bar")); |
| 132 session_->auth_cache()->Add(GURL("http://proxy:443/"), "MyRealm1", "Basic", | 132 session_->auth_cache()->Add(GURL("http://proxy:443/"), |
| 133 "Basic realm=MyRealm1", kFoo, kBar, "/"); | 133 "MyRealm1", |
| 134 HttpAuth::AUTH_SCHEME_BASIC, |
| 135 "Basic realm=MyRealm1", |
| 136 kFoo, |
| 137 kBar, |
| 138 "/"); |
| 134 } | 139 } |
| 135 | 140 |
| 136 MockClientSocketFactory socket_factory_; | 141 MockClientSocketFactory socket_factory_; |
| 137 scoped_ptr<HostResolver> host_resolver_; | 142 scoped_ptr<HostResolver> host_resolver_; |
| 138 scoped_ptr<CertVerifier> cert_verifier_; | 143 scoped_ptr<CertVerifier> cert_verifier_; |
| 139 scoped_ptr<HttpAuthHandlerFactory> http_auth_handler_factory_; | 144 scoped_ptr<HttpAuthHandlerFactory> http_auth_handler_factory_; |
| 140 scoped_refptr<HttpNetworkSession> session_; | 145 scoped_refptr<HttpNetworkSession> session_; |
| 141 | 146 |
| 142 scoped_refptr<TCPSocketParams> direct_tcp_socket_params_; | 147 scoped_refptr<TCPSocketParams> direct_tcp_socket_params_; |
| 143 ClientSocketPoolHistograms tcp_histograms_; | 148 ClientSocketPoolHistograms tcp_histograms_; |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 638 handle.release_pending_http_proxy_connection()); | 643 handle.release_pending_http_proxy_connection()); |
| 639 EXPECT_TRUE(tunnel_handle->socket()); | 644 EXPECT_TRUE(tunnel_handle->socket()); |
| 640 EXPECT_FALSE(tunnel_handle->socket()->IsConnected()); | 645 EXPECT_FALSE(tunnel_handle->socket()->IsConnected()); |
| 641 } | 646 } |
| 642 | 647 |
| 643 // It would be nice to also test the timeouts in SSLClientSocketPool. | 648 // It would be nice to also test the timeouts in SSLClientSocketPool. |
| 644 | 649 |
| 645 } // namespace | 650 } // namespace |
| 646 | 651 |
| 647 } // namespace net | 652 } // namespace net |
| OLD | NEW |