Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // ClientSocketPoolManager manages access to all ClientSocketPools. It's a | 5 // ClientSocketPoolManager manages access to all ClientSocketPools. It's a |
| 6 // simple container for all of them. Most importantly, it handles the lifetime | 6 // simple container for all of them. Most importantly, it handles the lifetime |
| 7 // and destruction order properly. | 7 // and destruction order properly. |
| 8 | 8 |
| 9 #ifndef NET_SOCKET_CLIENT_SOCKET_POOL_MANAGER_H_ | 9 #ifndef NET_SOCKET_CLIENT_SOCKET_POOL_MANAGER_H_ |
| 10 #define NET_SOCKET_CLIENT_SOCKET_POOL_MANAGER_H_ | 10 #define NET_SOCKET_CLIENT_SOCKET_POOL_MANAGER_H_ |
| 11 #pragma once | 11 #pragma once |
| 12 | 12 |
| 13 #include "net/base/completion_callback.h" | 13 #include "net/base/completion_callback.h" |
| 14 #include "net/base/net_export.h" | 14 #include "net/base/net_export.h" |
| 15 #include "net/base/request_priority.h" | 15 #include "net/base/request_priority.h" |
| 16 #include "net/http/http_proxy_client_socket_pool.h" | |
| 16 | 17 |
| 17 class GURL; | 18 class GURL; |
| 18 | 19 |
| 19 namespace base { | 20 namespace base { |
| 20 class Value; | 21 class Value; |
| 21 } | 22 } |
| 22 | 23 |
| 23 namespace net { | 24 namespace net { |
| 24 | 25 |
| 25 class BoundNetLog; | 26 class BoundNetLog; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 81 int request_load_flags, | 82 int request_load_flags, |
| 82 RequestPriority request_priority, | 83 RequestPriority request_priority, |
| 83 HttpNetworkSession* session, | 84 HttpNetworkSession* session, |
| 84 const ProxyInfo& proxy_info, | 85 const ProxyInfo& proxy_info, |
| 85 bool force_spdy_over_ssl, | 86 bool force_spdy_over_ssl, |
| 86 bool want_spdy_over_npn, | 87 bool want_spdy_over_npn, |
| 87 const SSLConfig& ssl_config_for_origin, | 88 const SSLConfig& ssl_config_for_origin, |
| 88 const SSLConfig& ssl_config_for_proxy, | 89 const SSLConfig& ssl_config_for_proxy, |
| 89 const BoundNetLog& net_log, | 90 const BoundNetLog& net_log, |
| 90 ClientSocketHandle* socket_handle, | 91 ClientSocketHandle* socket_handle, |
| 91 const CompletionCallback& callback); | 92 const CompletionCallback& callback, |
| 93 TunnelAuthNeededCB auth_needed_callback); | |
|
vandebo (ex-Chrome)
2012/01/19 20:12:49
I think the completion callback is usually last.
Ryan Hamilton
2012/01/19 23:11:19
Done.
| |
| 92 | 94 |
| 93 // A helper method that uses the passed in proxy information to initialize a | 95 // A helper method that uses the passed in proxy information to initialize a |
| 94 // ClientSocketHandle with the relevant socket pool. Use this method for | 96 // ClientSocketHandle with the relevant socket pool. Use this method for |
| 95 // a raw socket connection to a host-port pair (that needs to tunnel through | 97 // a raw socket connection to a host-port pair (that needs to tunnel through |
| 96 // the proxies). | 98 // the proxies). |
| 97 NET_EXPORT int InitSocketHandleForRawConnect( | 99 NET_EXPORT int InitSocketHandleForRawConnect( |
| 98 const HostPortPair& host_port_pair, | 100 const HostPortPair& host_port_pair, |
| 99 HttpNetworkSession* session, | 101 HttpNetworkSession* session, |
| 100 const ProxyInfo& proxy_info, | 102 const ProxyInfo& proxy_info, |
| 101 const SSLConfig& ssl_config_for_origin, | 103 const SSLConfig& ssl_config_for_origin, |
| 102 const SSLConfig& ssl_config_for_proxy, | 104 const SSLConfig& ssl_config_for_proxy, |
| 103 const BoundNetLog& net_log, | 105 const BoundNetLog& net_log, |
| 104 ClientSocketHandle* socket_handle, | 106 ClientSocketHandle* socket_handle, |
| 105 const CompletionCallback& callback); | 107 const CompletionCallback& callback, |
| 108 TunnelAuthNeededCB auth_needed_callback); | |
| 106 | 109 |
| 107 // Similar to InitSocketHandleForHttpRequest except that it initiates the | 110 // Similar to InitSocketHandleForHttpRequest except that it initiates the |
| 108 // desired number of preconnect streams from the relevant socket pool. | 111 // desired number of preconnect streams from the relevant socket pool. |
| 109 int PreconnectSocketsForHttpRequest( | 112 int PreconnectSocketsForHttpRequest( |
| 110 const GURL& request_url, | 113 const GURL& request_url, |
| 111 const HttpRequestHeaders& request_extra_headers, | 114 const HttpRequestHeaders& request_extra_headers, |
| 112 int request_load_flags, | 115 int request_load_flags, |
| 113 RequestPriority request_priority, | 116 RequestPriority request_priority, |
| 114 HttpNetworkSession* session, | 117 HttpNetworkSession* session, |
| 115 const ProxyInfo& proxy_info, | 118 const ProxyInfo& proxy_info, |
| 116 bool force_spdy_over_ssl, | 119 bool force_spdy_over_ssl, |
| 117 bool want_spdy_over_npn, | 120 bool want_spdy_over_npn, |
| 118 const SSLConfig& ssl_config_for_origin, | 121 const SSLConfig& ssl_config_for_origin, |
| 119 const SSLConfig& ssl_config_for_proxy, | 122 const SSLConfig& ssl_config_for_proxy, |
| 120 const BoundNetLog& net_log, | 123 const BoundNetLog& net_log, |
| 121 int num_preconnect_streams); | 124 int num_preconnect_streams, |
| 125 TunnelAuthNeededCB auth_needed_callback); | |
| 122 | 126 |
| 123 } // namespace net | 127 } // namespace net |
| 124 | 128 |
| 125 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_MANAGER_H_ | 129 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_MANAGER_H_ |
| OLD | NEW |