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

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

Issue 14813024: Introduce RequestWebSocketStream into HttpStreamFactory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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
« no previous file with comments | « net/socket/client_socket_pool_manager.h ('k') | net/socket/socket_test_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 const BoundNetLog& net_log, 81 const BoundNetLog& net_log,
82 int num_preconnect_streams, 82 int num_preconnect_streams,
83 ClientSocketHandle* socket_handle, 83 ClientSocketHandle* socket_handle,
84 const OnHostResolutionCallback& resolution_callback, 84 const OnHostResolutionCallback& resolution_callback,
85 const CompletionCallback& callback) { 85 const CompletionCallback& callback) {
86 scoped_refptr<TransportSocketParams> tcp_params; 86 scoped_refptr<TransportSocketParams> tcp_params;
87 scoped_refptr<HttpProxySocketParams> http_proxy_params; 87 scoped_refptr<HttpProxySocketParams> http_proxy_params;
88 scoped_refptr<SOCKSSocketParams> socks_params; 88 scoped_refptr<SOCKSSocketParams> socks_params;
89 scoped_ptr<HostPortPair> proxy_host_port; 89 scoped_ptr<HostPortPair> proxy_host_port;
90 90
91 bool using_ssl = request_url.SchemeIs("https") || force_spdy_over_ssl; 91 bool using_ssl = request_url.SchemeIs("https") ||
92 request_url.SchemeIs("wss") || force_spdy_over_ssl;
92 93
93 HostPortPair origin_host_port = 94 HostPortPair origin_host_port =
94 HostPortPair(request_url.HostNoBrackets(), 95 HostPortPair(request_url.HostNoBrackets(),
95 request_url.EffectiveIntPort()); 96 request_url.EffectiveIntPort());
96 97
97 if (!using_ssl && session->params().testing_fixed_http_port != 0) { 98 if (!using_ssl && session->params().testing_fixed_http_port != 0) {
98 origin_host_port.set_port(session->params().testing_fixed_http_port); 99 origin_host_port.set_port(session->params().testing_fixed_http_port);
99 } else if (using_ssl && session->params().testing_fixed_https_port != 0) { 100 } else if (using_ssl && session->params().testing_fixed_https_port != 0) {
100 origin_host_port.set_port(session->params().testing_fixed_https_port); 101 origin_host_port.set_port(session->params().testing_fixed_https_port);
101 } 102 }
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 const OnHostResolutionCallback& resolution_callback, 387 const OnHostResolutionCallback& resolution_callback,
387 const CompletionCallback& callback) { 388 const CompletionCallback& callback) {
388 DCHECK(socket_handle); 389 DCHECK(socket_handle);
389 return InitSocketPoolHelper( 390 return InitSocketPoolHelper(
390 request_url, request_extra_headers, request_load_flags, request_priority, 391 request_url, request_extra_headers, request_load_flags, request_priority,
391 session, proxy_info, force_spdy_over_ssl, want_spdy_over_npn, 392 session, proxy_info, force_spdy_over_ssl, want_spdy_over_npn,
392 ssl_config_for_origin, ssl_config_for_proxy, false, privacy_mode, net_log, 393 ssl_config_for_origin, ssl_config_for_proxy, false, privacy_mode, net_log,
393 0, socket_handle, resolution_callback, callback); 394 0, socket_handle, resolution_callback, callback);
394 } 395 }
395 396
397 int InitSocketHandleForWebSocketRequest(
398 const GURL& request_url,
399 const HttpRequestHeaders& request_extra_headers,
400 int request_load_flags,
401 RequestPriority request_priority,
402 HttpNetworkSession* session,
403 const ProxyInfo& proxy_info,
404 bool force_spdy_over_ssl,
405 bool want_spdy_over_npn,
406 const SSLConfig& ssl_config_for_origin,
407 const SSLConfig& ssl_config_for_proxy,
408 PrivacyMode privacy_mode,
409 const BoundNetLog& net_log,
410 ClientSocketHandle* socket_handle,
411 const OnHostResolutionCallback& resolution_callback,
412 const CompletionCallback& callback) {
413 DCHECK(socket_handle);
414 return InitSocketPoolHelper(
415 request_url, request_extra_headers, request_load_flags, request_priority,
416 session, proxy_info, force_spdy_over_ssl, want_spdy_over_npn,
417 ssl_config_for_origin, ssl_config_for_proxy, true, privacy_mode, net_log,
418 0, socket_handle, resolution_callback, callback);
419 }
420
396 int InitSocketHandleForRawConnect( 421 int InitSocketHandleForRawConnect(
397 const HostPortPair& host_port_pair, 422 const HostPortPair& host_port_pair,
398 HttpNetworkSession* session, 423 HttpNetworkSession* session,
399 const ProxyInfo& proxy_info, 424 const ProxyInfo& proxy_info,
400 const SSLConfig& ssl_config_for_origin, 425 const SSLConfig& ssl_config_for_origin,
401 const SSLConfig& ssl_config_for_proxy, 426 const SSLConfig& ssl_config_for_proxy,
402 PrivacyMode privacy_mode, 427 PrivacyMode privacy_mode,
403 const BoundNetLog& net_log, 428 const BoundNetLog& net_log,
404 ClientSocketHandle* socket_handle, 429 ClientSocketHandle* socket_handle,
405 const CompletionCallback& callback) { 430 const CompletionCallback& callback) {
(...skipping 27 matching lines...) Expand all
433 int num_preconnect_streams) { 458 int num_preconnect_streams) {
434 return InitSocketPoolHelper( 459 return InitSocketPoolHelper(
435 request_url, request_extra_headers, request_load_flags, request_priority, 460 request_url, request_extra_headers, request_load_flags, request_priority,
436 session, proxy_info, force_spdy_over_ssl, want_spdy_over_npn, 461 session, proxy_info, force_spdy_over_ssl, want_spdy_over_npn,
437 ssl_config_for_origin, ssl_config_for_proxy, false, privacy_mode, net_log, 462 ssl_config_for_origin, ssl_config_for_proxy, false, privacy_mode, net_log,
438 num_preconnect_streams, NULL, OnHostResolutionCallback(), 463 num_preconnect_streams, NULL, OnHostResolutionCallback(),
439 CompletionCallback()); 464 CompletionCallback());
440 } 465 }
441 466
442 } // namespace net 467 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/client_socket_pool_manager.h ('k') | net/socket/socket_test_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698