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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 HostPortPair("host", 443), | 147 HostPortPair("host", 443), |
148 ssl_config_, | 148 ssl_config_, |
149 PRIVACY_MODE_DISABLED, | 149 PRIVACY_MODE_DISABLED, |
150 0, | 150 0, |
151 want_spdy_over_npn)); | 151 want_spdy_over_npn)); |
152 } | 152 } |
153 | 153 |
154 void AddAuthToCache() { | 154 void AddAuthToCache() { |
155 const base::string16 kFoo(base::ASCIIToUTF16("foo")); | 155 const base::string16 kFoo(base::ASCIIToUTF16("foo")); |
156 const base::string16 kBar(base::ASCIIToUTF16("bar")); | 156 const base::string16 kBar(base::ASCIIToUTF16("bar")); |
157 session_->http_auth_cache()->Add(GURL("http://proxy:443/"), | 157 session_->http_auth_cache()->Add(url::Origin("http://proxy:443"), |
158 "MyRealm1", | 158 "MyRealm1", HttpAuth::AUTH_SCHEME_BASIC, |
159 HttpAuth::AUTH_SCHEME_BASIC, | |
160 "Basic realm=MyRealm1", | 159 "Basic realm=MyRealm1", |
161 AuthCredentials(kFoo, kBar), | 160 AuthCredentials(kFoo, kBar), "/"); |
162 "/"); | |
163 } | 161 } |
164 | 162 |
165 HttpNetworkSession* CreateNetworkSession() { | 163 HttpNetworkSession* CreateNetworkSession() { |
166 HttpNetworkSession::Params params; | 164 HttpNetworkSession::Params params; |
167 params.host_resolver = &host_resolver_; | 165 params.host_resolver = &host_resolver_; |
168 params.cert_verifier = cert_verifier_.get(); | 166 params.cert_verifier = cert_verifier_.get(); |
169 params.transport_security_state = transport_security_state_.get(); | 167 params.transport_security_state = transport_security_state_.get(); |
170 params.proxy_service = proxy_service_.get(); | 168 params.proxy_service = proxy_service_.get(); |
171 params.client_socket_factory = &socket_factory_; | 169 params.client_socket_factory = &socket_factory_; |
172 params.ssl_config_service = ssl_config_service_.get(); | 170 params.ssl_config_service = ssl_config_service_.get(); |
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
916 ssl.channel_id_sent = true; | 914 ssl.channel_id_sent = true; |
917 ssl.SetNextProto(GetParam()); | 915 ssl.SetNextProto(GetParam()); |
918 TestIPPoolingDisabled(&ssl); | 916 TestIPPoolingDisabled(&ssl); |
919 } | 917 } |
920 | 918 |
921 // It would be nice to also test the timeouts in SSLClientSocketPool. | 919 // It would be nice to also test the timeouts in SSLClientSocketPool. |
922 | 920 |
923 } // namespace | 921 } // namespace |
924 | 922 |
925 } // namespace net | 923 } // namespace net |
OLD | NEW |