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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 } | 230 } |
231 | 231 |
232 // Returns the a correctly constructed HttpProxyParms | 232 // Returns the a correctly constructed HttpProxyParms |
233 // for the HTTP or HTTPS proxy. | 233 // for the HTTP or HTTPS proxy. |
234 scoped_refptr<HttpProxySocketParams> CreateParams( | 234 scoped_refptr<HttpProxySocketParams> CreateParams( |
235 bool tunnel, | 235 bool tunnel, |
236 ProxyDelegate* proxy_delegate) { | 236 ProxyDelegate* proxy_delegate) { |
237 return scoped_refptr<HttpProxySocketParams>(new HttpProxySocketParams( | 237 return scoped_refptr<HttpProxySocketParams>(new HttpProxySocketParams( |
238 CreateHttpProxyParams(), | 238 CreateHttpProxyParams(), |
239 CreateHttpsProxyParams(), | 239 CreateHttpsProxyParams(), |
240 GURL(tunnel ? "https://www.google.com/" : "http://www.google.com"), | |
241 std::string(), | 240 std::string(), |
242 HostPortPair("www.google.com", tunnel ? 443 : 80), | 241 HostPortPair("www.google.com", tunnel ? 443 : 80), |
243 session_->http_auth_cache(), | 242 session_->http_auth_cache(), |
244 session_->http_auth_handler_factory(), | 243 session_->http_auth_handler_factory(), |
245 session_->spdy_session_pool(), | 244 session_->spdy_session_pool(), |
246 tunnel, | 245 tunnel, |
247 proxy_delegate)); | 246 proxy_delegate)); |
248 } | 247 } |
249 | 248 |
250 scoped_refptr<HttpProxySocketParams> CreateTunnelParams( | 249 scoped_refptr<HttpProxySocketParams> CreateTunnelParams( |
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
830 EXPECT_TRUE(headers->IsRedirect(&location)); | 829 EXPECT_TRUE(headers->IsRedirect(&location)); |
831 EXPECT_EQ(location, redirectTarget); | 830 EXPECT_EQ(location, redirectTarget); |
832 } | 831 } |
833 } | 832 } |
834 | 833 |
835 // It would be nice to also test the timeouts in HttpProxyClientSocketPool. | 834 // It would be nice to also test the timeouts in HttpProxyClientSocketPool. |
836 | 835 |
837 } // namespace | 836 } // namespace |
838 | 837 |
839 } // namespace net | 838 } // namespace net |
OLD | NEW |