Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Side by Side Diff: net/socket/client_socket_pool_manager.cc

Issue 1131293004: Add cross origin to Blink-driven preconnect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove crossorigin logic Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 bool enable_privacy_mode = (load_flags & LOAD_DO_NOT_SEND_COOKIES) ||
219 (load_flags & LOAD_DO_NOT_SAVE_COOKIES) ||
220 (load_flags & LOAD_DO_NOT_SEND_AUTH_DATA) ||
221 (privacy_mode == PRIVACY_MODE_ENABLED);
Ryan Sleevi 2015/06/12 21:36:00 It'd be good to add a comment here explaining why
222
218 // Change group name if privacy mode is enabled. 223 // Change group name if privacy mode is enabled.
219 if (privacy_mode == PRIVACY_MODE_ENABLED) 224 if (enable_privacy_mode)
220 connection_group = "pm/" + connection_group; 225 connection_group = "pm/" + connection_group;
221 226
222 // Deal with SSL - which layers on top of any given proxy. 227 // Deal with SSL - which layers on top of any given proxy.
223 if (using_ssl) { 228 if (using_ssl) {
224 scoped_refptr<TransportSocketParams> ssl_tcp_params; 229 scoped_refptr<TransportSocketParams> ssl_tcp_params;
225 if (proxy_info.is_direct()) { 230 if (proxy_info.is_direct()) {
226 // Setup TCP params if non-proxied SSL connection. 231 // Setup TCP params if non-proxied SSL connection.
227 // Combine connect and write for SSL sockets in TCP FastOpen field trial. 232 // Combine connect and write for SSL sockets in TCP FastOpen field trial.
228 TransportSocketParams::CombineConnectAndWritePolicy 233 TransportSocketParams::CombineConnectAndWritePolicy
229 combine_connect_and_write = 234 combine_connect_and_write =
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 int num_preconnect_streams) { 492 int num_preconnect_streams) {
488 return InitSocketPoolHelper( 493 return InitSocketPoolHelper(
489 group_type, endpoint, request_extra_headers, request_load_flags, 494 group_type, endpoint, request_extra_headers, request_load_flags,
490 request_priority, session, proxy_info, expect_spdy, ssl_config_for_origin, 495 request_priority, session, proxy_info, expect_spdy, ssl_config_for_origin,
491 ssl_config_for_proxy, /*force_tunnel=*/false, privacy_mode, net_log, 496 ssl_config_for_proxy, /*force_tunnel=*/false, privacy_mode, net_log,
492 num_preconnect_streams, NULL, HttpNetworkSession::NORMAL_SOCKET_POOL, 497 num_preconnect_streams, NULL, HttpNetworkSession::NORMAL_SOCKET_POOL,
493 OnHostResolutionCallback(), CompletionCallback()); 498 OnHostResolutionCallback(), CompletionCallback());
494 } 499 }
495 500
496 } // namespace net 501 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698