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

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

Issue 1006643002: Plumb connection attempts from (non-proxy) ConnectJobs to HttpNetworkTransaction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, resolve conflict Created 5 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
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_SOCKET_TRANSPORT_CLIENT_SOCKET_POOL_H_ 5 #ifndef NET_SOCKET_TRANSPORT_CLIENT_SOCKET_POOL_H_
6 #define NET_SOCKET_TRANSPORT_CLIENT_SOCKET_POOL_H_ 6 #define NET_SOCKET_TRANSPORT_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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 const scoped_refptr<TransportSocketParams>& params, 160 const scoped_refptr<TransportSocketParams>& params,
161 base::TimeDelta timeout_duration, 161 base::TimeDelta timeout_duration,
162 ClientSocketFactory* client_socket_factory, 162 ClientSocketFactory* client_socket_factory,
163 HostResolver* host_resolver, 163 HostResolver* host_resolver,
164 Delegate* delegate, 164 Delegate* delegate,
165 NetLog* net_log); 165 NetLog* net_log);
166 ~TransportConnectJob() override; 166 ~TransportConnectJob() override;
167 167
168 // ConnectJob methods. 168 // ConnectJob methods.
169 LoadState GetLoadState() const override; 169 LoadState GetLoadState() const override;
170 void GetAdditionalErrorState(ClientSocketHandle* handle) override;
170 171
171 // Rolls |addrlist| forward until the first IPv4 address, if any. 172 // Rolls |addrlist| forward until the first IPv4 address, if any.
172 // WARNING: this method should only be used to implement the prefer-IPv4 hack. 173 // WARNING: this method should only be used to implement the prefer-IPv4 hack.
173 static void MakeAddressListStartWithIPv4(AddressList* addrlist); 174 static void MakeAddressListStartWithIPv4(AddressList* addrlist);
174 175
175 private: 176 private:
176 enum ConnectInterval { 177 enum ConnectInterval {
177 CONNECT_INTERVAL_LE_10MS, 178 CONNECT_INTERVAL_LE_10MS,
178 CONNECT_INTERVAL_LE_20MS, 179 CONNECT_INTERVAL_LE_20MS,
179 CONNECT_INTERVAL_GT_20MS, 180 CONNECT_INTERVAL_GT_20MS,
(...skipping 20 matching lines...) Expand all
200 scoped_ptr<StreamSocket> transport_socket_; 201 scoped_ptr<StreamSocket> transport_socket_;
201 202
202 scoped_ptr<StreamSocket> fallback_transport_socket_; 203 scoped_ptr<StreamSocket> fallback_transport_socket_;
203 scoped_ptr<AddressList> fallback_addresses_; 204 scoped_ptr<AddressList> fallback_addresses_;
204 base::TimeTicks fallback_connect_start_time_; 205 base::TimeTicks fallback_connect_start_time_;
205 base::OneShotTimer<TransportConnectJob> fallback_timer_; 206 base::OneShotTimer<TransportConnectJob> fallback_timer_;
206 207
207 // Track the interval between this connect and previous connect. 208 // Track the interval between this connect and previous connect.
208 ConnectInterval interval_between_connects_; 209 ConnectInterval interval_between_connects_;
209 210
211 int resolve_result_;
212 int connect_result_;
213
210 DISALLOW_COPY_AND_ASSIGN(TransportConnectJob); 214 DISALLOW_COPY_AND_ASSIGN(TransportConnectJob);
211 }; 215 };
212 216
213 class NET_EXPORT_PRIVATE TransportClientSocketPool : public ClientSocketPool { 217 class NET_EXPORT_PRIVATE TransportClientSocketPool : public ClientSocketPool {
214 public: 218 public:
215 typedef TransportSocketParams SocketParams; 219 typedef TransportSocketParams SocketParams;
216 220
217 TransportClientSocketPool( 221 TransportClientSocketPool(
218 int max_sockets, 222 int max_sockets,
219 int max_sockets_per_group, 223 int max_sockets_per_group,
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 break; 354 break;
351 } 355 }
352 } while (rv != ERR_IO_PENDING && next_state_ != STATE_NONE); 356 } while (rv != ERR_IO_PENDING && next_state_ != STATE_NONE);
353 357
354 return rv; 358 return rv;
355 } 359 }
356 360
357 } // namespace net 361 } // namespace net
358 362
359 #endif // NET_SOCKET_TRANSPORT_CLIENT_SOCKET_POOL_H_ 363 #endif // NET_SOCKET_TRANSPORT_CLIENT_SOCKET_POOL_H_
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_pool_unittest.cc ('k') | net/socket/transport_client_socket_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698