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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 tcp_histograms_("MockTCP"), | 159 tcp_histograms_("MockTCP"), |
160 transport_socket_pool_( | 160 transport_socket_pool_( |
161 kMaxSockets, | 161 kMaxSockets, |
162 kMaxSocketsPerGroup, | 162 kMaxSocketsPerGroup, |
163 &tcp_histograms_, | 163 &tcp_histograms_, |
164 session_deps_.deterministic_socket_factory.get()), | 164 session_deps_.deterministic_socket_factory.get()), |
165 ssl_histograms_("MockSSL"), | 165 ssl_histograms_("MockSSL"), |
166 ssl_socket_pool_(kMaxSockets, | 166 ssl_socket_pool_(kMaxSockets, |
167 kMaxSocketsPerGroup, | 167 kMaxSocketsPerGroup, |
168 &ssl_histograms_, | 168 &ssl_histograms_, |
169 session_deps_.host_resolver.get(), | |
170 session_deps_.cert_verifier.get(), | 169 session_deps_.cert_verifier.get(), |
171 NULL /* channel_id_store */, | 170 NULL /* channel_id_store */, |
172 NULL /* transport_security_state */, | 171 NULL /* transport_security_state */, |
173 NULL /* cert_transparency_verifier */, | 172 NULL /* cert_transparency_verifier */, |
174 NULL /* cert_policy_enforcer */, | 173 NULL /* cert_policy_enforcer */, |
175 std::string() /* ssl_session_cache_shard */, | 174 std::string() /* ssl_session_cache_shard */, |
176 session_deps_.deterministic_socket_factory.get(), | 175 session_deps_.deterministic_socket_factory.get(), |
177 &transport_socket_pool_, | 176 &transport_socket_pool_, |
178 NULL, | 177 NULL, |
179 NULL, | 178 NULL, |
180 session_deps_.ssl_config_service.get(), | 179 session_deps_.ssl_config_service.get(), |
181 false, | 180 false, |
182 BoundNetLog().net_log()), | 181 BoundNetLog().net_log()), |
183 session_(CreateNetworkSession()), | 182 session_(CreateNetworkSession()), |
184 http_proxy_histograms_("HttpProxyUnitTest"), | 183 http_proxy_histograms_("HttpProxyUnitTest"), |
185 spdy_util_(GetParam().protocol), | 184 spdy_util_(GetParam().protocol), |
186 pool_(kMaxSockets, | 185 pool_(kMaxSockets, |
187 kMaxSocketsPerGroup, | 186 kMaxSocketsPerGroup, |
188 &http_proxy_histograms_, | 187 &http_proxy_histograms_, |
189 NULL, | |
190 &transport_socket_pool_, | 188 &transport_socket_pool_, |
191 &ssl_socket_pool_, | 189 &ssl_socket_pool_, |
192 NULL) {} | 190 NULL) {} |
193 | 191 |
194 virtual ~HttpProxyClientSocketPoolTest() { | 192 virtual ~HttpProxyClientSocketPoolTest() { |
195 } | 193 } |
196 | 194 |
197 void AddAuthToCache() { | 195 void AddAuthToCache() { |
198 const base::string16 kFoo(base::ASCIIToUTF16("foo")); | 196 const base::string16 kFoo(base::ASCIIToUTF16("foo")); |
199 const base::string16 kBar(base::ASCIIToUTF16("bar")); | 197 const base::string16 kBar(base::ASCIIToUTF16("bar")); |
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
845 EXPECT_TRUE(headers->IsRedirect(&location)); | 843 EXPECT_TRUE(headers->IsRedirect(&location)); |
846 EXPECT_EQ(location, redirectTarget); | 844 EXPECT_EQ(location, redirectTarget); |
847 } | 845 } |
848 } | 846 } |
849 | 847 |
850 // It would be nice to also test the timeouts in HttpProxyClientSocketPool. | 848 // It would be nice to also test the timeouts in HttpProxyClientSocketPool. |
851 | 849 |
852 } // namespace | 850 } // namespace |
853 | 851 |
854 } // namespace net | 852 } // namespace net |
OLD | NEW |