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 #include "net/socket/transport_client_socket_pool.h" | 5 #include "net/socket/transport_client_socket_pool.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 const scoped_refptr<TransportSocketParams>& params, | 92 const scoped_refptr<TransportSocketParams>& params, |
93 base::TimeDelta timeout_duration, | 93 base::TimeDelta timeout_duration, |
94 ClientSocketFactory* client_socket_factory, | 94 ClientSocketFactory* client_socket_factory, |
95 HostResolver* host_resolver, | 95 HostResolver* host_resolver, |
96 Delegate* delegate, | 96 Delegate* delegate, |
97 NetLog* net_log) | 97 NetLog* net_log) |
98 : ConnectJob(group_name, timeout_duration, delegate, | 98 : ConnectJob(group_name, timeout_duration, delegate, |
99 BoundNetLog::Make(net_log, NetLog::SOURCE_CONNECT_JOB)), | 99 BoundNetLog::Make(net_log, NetLog::SOURCE_CONNECT_JOB)), |
100 params_(params), | 100 params_(params), |
101 client_socket_factory_(client_socket_factory), | 101 client_socket_factory_(client_socket_factory), |
102 resolver_(host_resolver) {} | 102 resolver_(host_resolver), |
| 103 next_state_(STATE_NONE) { |
| 104 } |
103 | 105 |
104 TransportConnectJob::~TransportConnectJob() { | 106 TransportConnectJob::~TransportConnectJob() { |
105 // We don't worry about cancelling the host resolution and TCP connect, since | 107 // We don't worry about cancelling the host resolution and TCP connect, since |
106 // ~SingleRequestHostResolver and ~StreamSocket will take care of it. | 108 // ~SingleRequestHostResolver and ~StreamSocket will take care of it. |
107 } | 109 } |
108 | 110 |
109 LoadState TransportConnectJob::GetLoadState() const { | 111 LoadState TransportConnectJob::GetLoadState() const { |
110 switch (next_state_) { | 112 switch (next_state_) { |
111 case STATE_RESOLVE_HOST: | 113 case STATE_RESOLVE_HOST: |
112 case STATE_RESOLVE_HOST_COMPLETE: | 114 case STATE_RESOLVE_HOST_COMPLETE: |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 | 488 |
487 base::TimeDelta TransportClientSocketPool::ConnectionTimeout() const { | 489 base::TimeDelta TransportClientSocketPool::ConnectionTimeout() const { |
488 return base_.ConnectionTimeout(); | 490 return base_.ConnectionTimeout(); |
489 } | 491 } |
490 | 492 |
491 ClientSocketPoolHistograms* TransportClientSocketPool::histograms() const { | 493 ClientSocketPoolHistograms* TransportClientSocketPool::histograms() const { |
492 return base_.histograms(); | 494 return base_.histograms(); |
493 } | 495 } |
494 | 496 |
495 } // namespace net | 497 } // namespace net |
OLD | NEW |