| 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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 "MyRealm1", | 185 "MyRealm1", |
| 186 HttpAuth::AUTH_SCHEME_BASIC, | 186 HttpAuth::AUTH_SCHEME_BASIC, |
| 187 "Basic realm=MyRealm1", | 187 "Basic realm=MyRealm1", |
| 188 AuthCredentials(kFoo, kBar), | 188 AuthCredentials(kFoo, kBar), |
| 189 "/"); | 189 "/"); |
| 190 } | 190 } |
| 191 | 191 |
| 192 scoped_refptr<TransportSocketParams> CreateHttpProxyParams() const { | 192 scoped_refptr<TransportSocketParams> CreateHttpProxyParams() const { |
| 193 if (GetParam().proxy_type != HTTP) | 193 if (GetParam().proxy_type != HTTP) |
| 194 return NULL; | 194 return NULL; |
| 195 return new TransportSocketParams(HostPortPair(kHttpProxyHost, 80), | 195 return new TransportSocketParams( |
| 196 false, | 196 HostPortPair(kHttpProxyHost, 80), |
| 197 false, | 197 false, |
| 198 OnHostResolutionCallback()); | 198 false, |
| 199 OnHostResolutionCallback(), |
| 200 TransportSocketParams::COMBINE_CONNECT_AND_WRITE_DEFAULT); |
| 199 } | 201 } |
| 200 | 202 |
| 201 scoped_refptr<SSLSocketParams> CreateHttpsProxyParams() const { | 203 scoped_refptr<SSLSocketParams> CreateHttpsProxyParams() const { |
| 202 if (GetParam().proxy_type == HTTP) | 204 if (GetParam().proxy_type == HTTP) |
| 203 return NULL; | 205 return NULL; |
| 204 return new SSLSocketParams( | 206 return new SSLSocketParams( |
| 205 new TransportSocketParams( | 207 new TransportSocketParams( |
| 206 HostPortPair(kHttpsProxyHost, 443), | 208 HostPortPair(kHttpsProxyHost, 443), |
| 207 false, | 209 false, |
| 208 false, | 210 false, |
| 209 OnHostResolutionCallback()), | 211 OnHostResolutionCallback(), |
| 212 TransportSocketParams::COMBINE_CONNECT_AND_WRITE_DEFAULT), |
| 210 NULL, | 213 NULL, |
| 211 NULL, | 214 NULL, |
| 212 HostPortPair(kHttpsProxyHost, 443), | 215 HostPortPair(kHttpsProxyHost, 443), |
| 213 SSLConfig(), | 216 SSLConfig(), |
| 214 PRIVACY_MODE_DISABLED, | 217 PRIVACY_MODE_DISABLED, |
| 215 0, | 218 0, |
| 216 false, | 219 false, |
| 217 false); | 220 false); |
| 218 } | 221 } |
| 219 | 222 |
| (...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 807 EXPECT_TRUE(headers->IsRedirect(&location)); | 810 EXPECT_TRUE(headers->IsRedirect(&location)); |
| 808 EXPECT_EQ(location, redirectTarget); | 811 EXPECT_EQ(location, redirectTarget); |
| 809 } | 812 } |
| 810 } | 813 } |
| 811 | 814 |
| 812 // It would be nice to also test the timeouts in HttpProxyClientSocketPool. | 815 // It would be nice to also test the timeouts in HttpProxyClientSocketPool. |
| 813 | 816 |
| 814 } // namespace | 817 } // namespace |
| 815 | 818 |
| 816 } // namespace net | 819 } // namespace net |
| OLD | NEW |