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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 AuthCredentials(kFoo, kBar), | 113 AuthCredentials(kFoo, kBar), |
114 "/"); | 114 "/"); |
115 } | 115 } |
116 | 116 |
117 scoped_refptr<TransportSocketParams> CreateHttpProxyParams() const { | 117 scoped_refptr<TransportSocketParams> CreateHttpProxyParams() const { |
118 if (GetParam().proxy_type != HTTP) | 118 if (GetParam().proxy_type != HTTP) |
119 return NULL; | 119 return NULL; |
120 return new TransportSocketParams(HostPortPair(kHttpProxyHost, 80), | 120 return new TransportSocketParams(HostPortPair(kHttpProxyHost, 80), |
121 false, | 121 false, |
122 false, | 122 false, |
123 OnHostResolutionCallback()); | 123 OnHostResolutionCallback(), |
| 124 AUTO_CONNECT_USE_DEFAULT); |
124 } | 125 } |
125 | 126 |
126 scoped_refptr<SSLSocketParams> CreateHttpsProxyParams() const { | 127 scoped_refptr<SSLSocketParams> CreateHttpsProxyParams() const { |
127 if (GetParam().proxy_type == HTTP) | 128 if (GetParam().proxy_type == HTTP) |
128 return NULL; | 129 return NULL; |
129 return new SSLSocketParams( | 130 return new SSLSocketParams( |
130 new TransportSocketParams( | 131 new TransportSocketParams( |
131 HostPortPair(kHttpsProxyHost, 443), | 132 HostPortPair(kHttpsProxyHost, 443), |
132 false, | 133 false, |
133 false, | 134 false, |
134 OnHostResolutionCallback()), | 135 OnHostResolutionCallback(), |
| 136 AUTO_CONNECT_USE_DEFAULT), |
135 NULL, | 137 NULL, |
136 NULL, | 138 NULL, |
137 HostPortPair(kHttpsProxyHost, 443), | 139 HostPortPair(kHttpsProxyHost, 443), |
138 SSLConfig(), | 140 SSLConfig(), |
139 PRIVACY_MODE_DISABLED, | 141 PRIVACY_MODE_DISABLED, |
140 0, | 142 0, |
141 false, | 143 false, |
142 false); | 144 false); |
143 } | 145 } |
144 | 146 |
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
713 EXPECT_TRUE(headers->IsRedirect(&location)); | 715 EXPECT_TRUE(headers->IsRedirect(&location)); |
714 EXPECT_EQ(location, redirectTarget); | 716 EXPECT_EQ(location, redirectTarget); |
715 } | 717 } |
716 } | 718 } |
717 | 719 |
718 // It would be nice to also test the timeouts in HttpProxyClientSocketPool. | 720 // It would be nice to also test the timeouts in HttpProxyClientSocketPool. |
719 | 721 |
720 } // namespace | 722 } // namespace |
721 | 723 |
722 } // namespace net | 724 } // namespace net |
OLD | NEW |