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

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

Issue 9148011: Allow chrome to handle 407 auth challenges to CONNECT requests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Address feedback from both vandebo and akalin Created 8 years, 11 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 | Annotate | Revision Log
OLDNEW
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;
26 class ClientSocketHandle; 27 class ClientSocketHandle;
27 class HostPortPair; 28 class HostPortPair;
28 class HttpNetworkSession; 29 class HttpNetworkSession;
29 class HttpProxyClientSocketPool; 30 class HttpProxyClientSocketPool;
cbentzel 2012/01/20 02:09:46 This forward declaration is no longer needed. Howe
Ryan Hamilton 2012/01/20 04:20:04 Removed the forward decl. yes, this is for the ty
30 class HttpRequestHeaders; 31 class HttpRequestHeaders;
31 class ProxyInfo; 32 class ProxyInfo;
32 class TransportClientSocketPool; 33 class TransportClientSocketPool;
33 class SOCKSClientSocketPool; 34 class SOCKSClientSocketPool;
34 class SSLClientSocketPool; 35 class SSLClientSocketPool;
35 36
36 struct SSLConfig; 37 struct SSLConfig;
37 38
38 // This should rather be a simple constant but Windows shared libs doesn't 39 // This should rather be a simple constant but Windows shared libs doesn't
39 // really offer much flexiblity in exporting contants. 40 // really offer much flexiblity in exporting contants.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
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,
92 TunnelAuthCallback auth_needed_callback,
91 const CompletionCallback& callback); 93 const CompletionCallback& callback);
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,
107 TunnelAuthCallback auth_needed_callback,
105 const CompletionCallback& callback); 108 const CompletionCallback& 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 TunnelAuthCallback 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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698