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

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

Issue 506523002: net : Declaring the weak_ptr_factory in proper order. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: incorporated the review comments. Created 6 years, 3 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 #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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 145
146 // Begins the tcp connection and the optional Http proxy tunnel. If the 146 // Begins the tcp connection and the optional Http proxy tunnel. If the
147 // request is not immediately servicable (likely), the request will return 147 // request is not immediately servicable (likely), the request will return
148 // ERR_IO_PENDING. An OK return from this function or the callback means 148 // ERR_IO_PENDING. An OK return from this function or the callback means
149 // that the connection is established; ERR_PROXY_AUTH_REQUESTED means 149 // that the connection is established; ERR_PROXY_AUTH_REQUESTED means
150 // that the tunnel needs authentication credentials, the socket will be 150 // that the tunnel needs authentication credentials, the socket will be
151 // returned in this case, and must be release back to the pool; or 151 // returned in this case, and must be release back to the pool; or
152 // a standard net error code will be returned. 152 // a standard net error code will be returned.
153 virtual int ConnectInternal() OVERRIDE; 153 virtual int ConnectInternal() OVERRIDE;
154 154
155 base::WeakPtrFactory<HttpProxyConnectJob> weak_ptr_factory_;
156 scoped_refptr<HttpProxySocketParams> params_; 155 scoped_refptr<HttpProxySocketParams> params_;
157 TransportClientSocketPool* const transport_pool_; 156 TransportClientSocketPool* const transport_pool_;
158 SSLClientSocketPool* const ssl_pool_; 157 SSLClientSocketPool* const ssl_pool_;
159 HostResolver* const resolver_; 158 HostResolver* const resolver_;
160 159
161 State next_state_; 160 State next_state_;
162 CompletionCallback callback_; 161 CompletionCallback callback_;
163 scoped_ptr<ClientSocketHandle> transport_socket_handle_; 162 scoped_ptr<ClientSocketHandle> transport_socket_handle_;
164 scoped_ptr<ProxyClientSocket> transport_socket_; 163 scoped_ptr<ProxyClientSocket> transport_socket_;
165 bool using_spdy_; 164 bool using_spdy_;
166 // Protocol negotiated with the server. 165 // Protocol negotiated with the server.
167 NextProto protocol_negotiated_; 166 NextProto protocol_negotiated_;
168 167
169 HttpResponseInfo error_response_info_; 168 HttpResponseInfo error_response_info_;
170 169
171 SpdyStreamRequest spdy_stream_request_; 170 SpdyStreamRequest spdy_stream_request_;
172 171
172 base::WeakPtrFactory<HttpProxyConnectJob> weak_ptr_factory_;
173
173 DISALLOW_COPY_AND_ASSIGN(HttpProxyConnectJob); 174 DISALLOW_COPY_AND_ASSIGN(HttpProxyConnectJob);
174 }; 175 };
175 176
176 class NET_EXPORT_PRIVATE HttpProxyClientSocketPool 177 class NET_EXPORT_PRIVATE HttpProxyClientSocketPool
177 : public ClientSocketPool, 178 : public ClientSocketPool,
178 public HigherLayeredPool { 179 public HigherLayeredPool {
179 public: 180 public:
180 typedef HttpProxySocketParams SocketParams; 181 typedef HttpProxySocketParams SocketParams;
181 182
182 HttpProxyClientSocketPool( 183 HttpProxyClientSocketPool(
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 TransportClientSocketPool* const transport_pool_; 275 TransportClientSocketPool* const transport_pool_;
275 SSLClientSocketPool* const ssl_pool_; 276 SSLClientSocketPool* const ssl_pool_;
276 PoolBase base_; 277 PoolBase base_;
277 278
278 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocketPool); 279 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocketPool);
279 }; 280 };
280 281
281 } // namespace net 282 } // namespace net
282 283
283 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_POOL_H_ 284 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_POOL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698