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

Side by Side Diff: net/http/http_proxy_client_socket_pool.h

Issue 266243004: Clang format slam. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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) 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 #ifndef NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_POOL_H_ 5 #ifndef NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_POOL_H_
6 #define NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_POOL_H_ 6 #define NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_POOL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 const scoped_refptr<SSLSocketParams>& ssl_params() const { 59 const scoped_refptr<SSLSocketParams>& ssl_params() const {
60 return ssl_params_; 60 return ssl_params_;
61 } 61 }
62 const GURL& request_url() const { return request_url_; } 62 const GURL& request_url() const { return request_url_; }
63 const std::string& user_agent() const { return user_agent_; } 63 const std::string& user_agent() const { return user_agent_; }
64 const HostPortPair& endpoint() const { return endpoint_; } 64 const HostPortPair& endpoint() const { return endpoint_; }
65 HttpAuthCache* http_auth_cache() const { return http_auth_cache_; } 65 HttpAuthCache* http_auth_cache() const { return http_auth_cache_; }
66 HttpAuthHandlerFactory* http_auth_handler_factory() const { 66 HttpAuthHandlerFactory* http_auth_handler_factory() const {
67 return http_auth_handler_factory_; 67 return http_auth_handler_factory_;
68 } 68 }
69 SpdySessionPool* spdy_session_pool() { 69 SpdySessionPool* spdy_session_pool() { return spdy_session_pool_; }
70 return spdy_session_pool_;
71 }
72 const HostResolver::RequestInfo& destination() const; 70 const HostResolver::RequestInfo& destination() const;
73 bool tunnel() const { return tunnel_; } 71 bool tunnel() const { return tunnel_; }
74 bool ignore_limits() const { return ignore_limits_; } 72 bool ignore_limits() const { return ignore_limits_; }
75 73
76 private: 74 private:
77 friend class base::RefCounted<HttpProxySocketParams>; 75 friend class base::RefCounted<HttpProxySocketParams>;
78 ~HttpProxySocketParams(); 76 ~HttpProxySocketParams();
79 77
80 const scoped_refptr<TransportSocketParams> transport_params_; 78 const scoped_refptr<TransportSocketParams> transport_params_;
81 const scoped_refptr<SSLSocketParams> ssl_params_; 79 const scoped_refptr<SSLSocketParams> ssl_params_;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 // Protocol negotiated with the server. 164 // Protocol negotiated with the server.
167 NextProto protocol_negotiated_; 165 NextProto protocol_negotiated_;
168 166
169 HttpResponseInfo error_response_info_; 167 HttpResponseInfo error_response_info_;
170 168
171 SpdyStreamRequest spdy_stream_request_; 169 SpdyStreamRequest spdy_stream_request_;
172 170
173 DISALLOW_COPY_AND_ASSIGN(HttpProxyConnectJob); 171 DISALLOW_COPY_AND_ASSIGN(HttpProxyConnectJob);
174 }; 172 };
175 173
176 class NET_EXPORT_PRIVATE HttpProxyClientSocketPool 174 class NET_EXPORT_PRIVATE HttpProxyClientSocketPool : public ClientSocketPool,
177 : public ClientSocketPool, 175 public HigherLayeredPool {
178 public HigherLayeredPool {
179 public: 176 public:
180 typedef HttpProxySocketParams SocketParams; 177 typedef HttpProxySocketParams SocketParams;
181 178
182 HttpProxyClientSocketPool( 179 HttpProxyClientSocketPool(int max_sockets,
183 int max_sockets, 180 int max_sockets_per_group,
184 int max_sockets_per_group, 181 ClientSocketPoolHistograms* histograms,
185 ClientSocketPoolHistograms* histograms, 182 HostResolver* host_resolver,
186 HostResolver* host_resolver, 183 TransportClientSocketPool* transport_pool,
187 TransportClientSocketPool* transport_pool, 184 SSLClientSocketPool* ssl_pool,
188 SSLClientSocketPool* ssl_pool, 185 NetLog* net_log);
189 NetLog* net_log);
190 186
191 virtual ~HttpProxyClientSocketPool(); 187 virtual ~HttpProxyClientSocketPool();
192 188
193 // ClientSocketPool implementation. 189 // ClientSocketPool implementation.
194 virtual int RequestSocket(const std::string& group_name, 190 virtual int RequestSocket(const std::string& group_name,
195 const void* connect_params, 191 const void* connect_params,
196 RequestPriority priority, 192 RequestPriority priority,
197 ClientSocketHandle* handle, 193 ClientSocketHandle* handle,
198 const CompletionCallback& callback, 194 const CompletionCallback& callback,
199 const BoundNetLog& net_log) OVERRIDE; 195 const BoundNetLog& net_log) OVERRIDE;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 virtual void RemoveHigherLayeredPool(HigherLayeredPool* higher_pool) OVERRIDE; 236 virtual void RemoveHigherLayeredPool(HigherLayeredPool* higher_pool) OVERRIDE;
241 237
242 // HigherLayeredPool implementation. 238 // HigherLayeredPool implementation.
243 virtual bool CloseOneIdleConnection() OVERRIDE; 239 virtual bool CloseOneIdleConnection() OVERRIDE;
244 240
245 private: 241 private:
246 typedef ClientSocketPoolBase<HttpProxySocketParams> PoolBase; 242 typedef ClientSocketPoolBase<HttpProxySocketParams> PoolBase;
247 243
248 class HttpProxyConnectJobFactory : public PoolBase::ConnectJobFactory { 244 class HttpProxyConnectJobFactory : public PoolBase::ConnectJobFactory {
249 public: 245 public:
250 HttpProxyConnectJobFactory( 246 HttpProxyConnectJobFactory(TransportClientSocketPool* transport_pool,
251 TransportClientSocketPool* transport_pool, 247 SSLClientSocketPool* ssl_pool,
252 SSLClientSocketPool* ssl_pool, 248 HostResolver* host_resolver,
253 HostResolver* host_resolver, 249 NetLog* net_log);
254 NetLog* net_log);
255 250
256 // ClientSocketPoolBase::ConnectJobFactory methods. 251 // ClientSocketPoolBase::ConnectJobFactory methods.
257 virtual scoped_ptr<ConnectJob> NewConnectJob( 252 virtual scoped_ptr<ConnectJob> NewConnectJob(
258 const std::string& group_name, 253 const std::string& group_name,
259 const PoolBase::Request& request, 254 const PoolBase::Request& request,
260 ConnectJob::Delegate* delegate) const OVERRIDE; 255 ConnectJob::Delegate* delegate) const OVERRIDE;
261 256
262 virtual base::TimeDelta ConnectionTimeout() const OVERRIDE; 257 virtual base::TimeDelta ConnectionTimeout() const OVERRIDE;
263 258
264 private: 259 private:
265 TransportClientSocketPool* const transport_pool_; 260 TransportClientSocketPool* const transport_pool_;
266 SSLClientSocketPool* const ssl_pool_; 261 SSLClientSocketPool* const ssl_pool_;
267 HostResolver* const host_resolver_; 262 HostResolver* const host_resolver_;
268 NetLog* net_log_; 263 NetLog* net_log_;
269 base::TimeDelta timeout_; 264 base::TimeDelta timeout_;
270 265
271 DISALLOW_COPY_AND_ASSIGN(HttpProxyConnectJobFactory); 266 DISALLOW_COPY_AND_ASSIGN(HttpProxyConnectJobFactory);
272 }; 267 };
273 268
274 TransportClientSocketPool* const transport_pool_; 269 TransportClientSocketPool* const transport_pool_;
275 SSLClientSocketPool* const ssl_pool_; 270 SSLClientSocketPool* const ssl_pool_;
276 PoolBase base_; 271 PoolBase base_;
277 272
278 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocketPool); 273 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocketPool);
279 }; 274 };
280 275
281 } // namespace net 276 } // namespace net
282 277
283 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_POOL_H_ 278 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_POOL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698