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/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 : NULL, | 144 : NULL, |
145 proxy == ProxyServer::SCHEME_SOCKS5 ? socks_socket_params_ : NULL, | 145 proxy == ProxyServer::SCHEME_SOCKS5 ? socks_socket_params_ : NULL, |
146 proxy == ProxyServer::SCHEME_HTTP ? http_proxy_socket_params_ : NULL, | 146 proxy == ProxyServer::SCHEME_HTTP ? http_proxy_socket_params_ : NULL, |
147 HostPortPair("host", 443), ssl_config_, PRIVACY_MODE_DISABLED, 0, | 147 HostPortPair("host", 443), ssl_config_, PRIVACY_MODE_DISABLED, 0, |
148 expect_spdy)); | 148 expect_spdy)); |
149 } | 149 } |
150 | 150 |
151 void AddAuthToCache() { | 151 void AddAuthToCache() { |
152 const base::string16 kFoo(base::ASCIIToUTF16("foo")); | 152 const base::string16 kFoo(base::ASCIIToUTF16("foo")); |
153 const base::string16 kBar(base::ASCIIToUTF16("bar")); | 153 const base::string16 kBar(base::ASCIIToUTF16("bar")); |
154 session_->http_auth_cache()->Add(GURL("http://proxy:443/"), | 154 session_->http_auth_cache()->Add(GURL("http://proxy:443/"), "MyRealm1", |
155 "MyRealm1", | 155 "basic", "Basic realm=MyRealm1", |
156 HttpAuth::AUTH_SCHEME_BASIC, | 156 AuthCredentials(kFoo, kBar), "/"); |
157 "Basic realm=MyRealm1", | |
158 AuthCredentials(kFoo, kBar), | |
159 "/"); | |
160 } | 157 } |
161 | 158 |
162 HttpNetworkSession* CreateNetworkSession() { | 159 HttpNetworkSession* CreateNetworkSession() { |
163 HttpNetworkSession::Params params; | 160 HttpNetworkSession::Params params; |
164 params.host_resolver = &host_resolver_; | 161 params.host_resolver = &host_resolver_; |
165 params.cert_verifier = cert_verifier_.get(); | 162 params.cert_verifier = cert_verifier_.get(); |
166 params.transport_security_state = transport_security_state_.get(); | 163 params.transport_security_state = transport_security_state_.get(); |
167 params.proxy_service = proxy_service_.get(); | 164 params.proxy_service = proxy_service_.get(); |
168 params.client_socket_factory = &socket_factory_; | 165 params.client_socket_factory = &socket_factory_; |
169 params.ssl_config_service = ssl_config_service_.get(); | 166 params.ssl_config_service = ssl_config_service_.get(); |
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
912 ssl.channel_id_sent = true; | 909 ssl.channel_id_sent = true; |
913 ssl.SetNextProto(GetParam()); | 910 ssl.SetNextProto(GetParam()); |
914 TestIPPoolingDisabled(&ssl); | 911 TestIPPoolingDisabled(&ssl); |
915 } | 912 } |
916 | 913 |
917 // It would be nice to also test the timeouts in SSLClientSocketPool. | 914 // It would be nice to also test the timeouts in SSLClientSocketPool. |
918 | 915 |
919 } // namespace | 916 } // namespace |
920 | 917 |
921 } // namespace net | 918 } // namespace net |
OLD | NEW |