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/socket/client_socket_pool_manager.h" | 5 #include "net/socket/client_socket_pool_manager.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
208 socks_version = '4'; | 208 socks_version = '4'; |
209 connection_group = base::StringPrintf( | 209 connection_group = base::StringPrintf( |
210 "socks%c/%s", socks_version, connection_group.c_str()); | 210 "socks%c/%s", socks_version, connection_group.c_str()); |
211 | 211 |
212 socks_params = new SOCKSSocketParams(proxy_tcp_params, | 212 socks_params = new SOCKSSocketParams(proxy_tcp_params, |
213 socks_version == '5', | 213 socks_version == '5', |
214 origin_host_port); | 214 origin_host_port); |
215 } | 215 } |
216 } | 216 } |
217 | 217 |
218 // Turn on privacy mode if it was enabled, or if the load flags indicate | |
219 // that credentials cannot be sent. | |
220 bool enable_privacy_mode = (load_flags & LOAD_DO_NOT_SEND_COOKIES) || | |
221 (load_flags & LOAD_DO_NOT_SAVE_COOKIES) || | |
222 (load_flags & LOAD_DO_NOT_SEND_AUTH_DATA) || | |
223 (privacy_mode == PRIVACY_MODE_ENABLED); | |
mmenke
2015/07/14 16:32:03
I guess this is supposed to mirror the logic in UR
Ryan Sleevi
2015/07/14 18:41:02
No, it's to mirror https://code.google.com/p/chrom
mmenke
2015/07/14 18:52:12
So then why doesn't https://code.google.com/p/chro
Ryan Sleevi
2015/07/14 18:55:32
Oof, yeah, good catch on the bug.
Basically, the
mmenke
2015/07/14 19:10:52
I'm skeptical of the idea of sharing a URLRequestC
| |
224 | |
mmenke
2015/07/14 16:32:03
The existing test for privacy mode socket use is H
| |
218 // Change group name if privacy mode is enabled. | 225 // Change group name if privacy mode is enabled. |
219 if (privacy_mode == PRIVACY_MODE_ENABLED) | 226 if (enable_privacy_mode) |
220 connection_group = "pm/" + connection_group; | 227 connection_group = "pm/" + connection_group; |
221 | 228 |
222 // Deal with SSL - which layers on top of any given proxy. | 229 // Deal with SSL - which layers on top of any given proxy. |
223 if (using_ssl) { | 230 if (using_ssl) { |
224 scoped_refptr<TransportSocketParams> ssl_tcp_params; | 231 scoped_refptr<TransportSocketParams> ssl_tcp_params; |
225 if (proxy_info.is_direct()) { | 232 if (proxy_info.is_direct()) { |
226 // Setup TCP params if non-proxied SSL connection. | 233 // Setup TCP params if non-proxied SSL connection. |
227 // Combine connect and write for SSL sockets in TCP FastOpen field trial. | 234 // Combine connect and write for SSL sockets in TCP FastOpen field trial. |
228 TransportSocketParams::CombineConnectAndWritePolicy | 235 TransportSocketParams::CombineConnectAndWritePolicy |
229 combine_connect_and_write = | 236 combine_connect_and_write = |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
487 int num_preconnect_streams) { | 494 int num_preconnect_streams) { |
488 return InitSocketPoolHelper( | 495 return InitSocketPoolHelper( |
489 group_type, endpoint, request_extra_headers, request_load_flags, | 496 group_type, endpoint, request_extra_headers, request_load_flags, |
490 request_priority, session, proxy_info, expect_spdy, ssl_config_for_origin, | 497 request_priority, session, proxy_info, expect_spdy, ssl_config_for_origin, |
491 ssl_config_for_proxy, /*force_tunnel=*/false, privacy_mode, net_log, | 498 ssl_config_for_proxy, /*force_tunnel=*/false, privacy_mode, net_log, |
492 num_preconnect_streams, NULL, HttpNetworkSession::NORMAL_SOCKET_POOL, | 499 num_preconnect_streams, NULL, HttpNetworkSession::NORMAL_SOCKET_POOL, |
493 OnHostResolutionCallback(), CompletionCallback()); | 500 OnHostResolutionCallback(), CompletionCallback()); |
494 } | 501 } |
495 | 502 |
496 } // namespace net | 503 } // namespace net |
OLD | NEW |