| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 } | 54 } |
| 55 | 55 |
| 56 return true; | 56 return true; |
| 57 } | 57 } |
| 58 | 58 |
| 59 } // namespace | 59 } // namespace |
| 60 | 60 |
| 61 TransportSocketParams::TransportSocketParams( | 61 TransportSocketParams::TransportSocketParams( |
| 62 const HostPortPair& host_port_pair, | 62 const HostPortPair& host_port_pair, |
| 63 RequestPriority priority, | 63 RequestPriority priority, |
| 64 const GURL& referrer, | |
| 65 bool disable_resolver_cache, | 64 bool disable_resolver_cache, |
| 66 bool ignore_limits) | 65 bool ignore_limits) |
| 67 : destination_(host_port_pair), ignore_limits_(ignore_limits) { | 66 : destination_(host_port_pair), ignore_limits_(ignore_limits) { |
| 68 Initialize(priority, referrer, disable_resolver_cache); | 67 Initialize(priority, disable_resolver_cache); |
| 69 } | 68 } |
| 70 | 69 |
| 71 TransportSocketParams::~TransportSocketParams() {} | 70 TransportSocketParams::~TransportSocketParams() {} |
| 72 | 71 |
| 73 // TODO(szym): remove unneeded referrer | |
| 74 void TransportSocketParams::Initialize(RequestPriority priority, | 72 void TransportSocketParams::Initialize(RequestPriority priority, |
| 75 const GURL& referrer, | |
| 76 bool disable_resolver_cache) { | 73 bool disable_resolver_cache) { |
| 77 destination_.set_priority(priority); | 74 destination_.set_priority(priority); |
| 78 if (disable_resolver_cache) | 75 if (disable_resolver_cache) |
| 79 destination_.set_allow_cached_response(false); | 76 destination_.set_allow_cached_response(false); |
| 80 } | 77 } |
| 81 | 78 |
| 82 // TransportConnectJobs will time out after this many seconds. Note this is | 79 // TransportConnectJobs will time out after this many seconds. Note this is |
| 83 // the total time, including both host resolution and TCP connect() times. | 80 // the total time, including both host resolution and TCP connect() times. |
| 84 // | 81 // |
| 85 // TODO(eroman): The use of this constant needs to be re-evaluated. The time | 82 // TODO(eroman): The use of this constant needs to be re-evaluated. The time |
| (...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 | 475 |
| 479 base::TimeDelta TransportClientSocketPool::ConnectionTimeout() const { | 476 base::TimeDelta TransportClientSocketPool::ConnectionTimeout() const { |
| 480 return base_.ConnectionTimeout(); | 477 return base_.ConnectionTimeout(); |
| 481 } | 478 } |
| 482 | 479 |
| 483 ClientSocketPoolHistograms* TransportClientSocketPool::histograms() const { | 480 ClientSocketPoolHistograms* TransportClientSocketPool::histograms() const { |
| 484 return base_.histograms(); | 481 return base_.histograms(); |
| 485 } | 482 } |
| 486 | 483 |
| 487 } // namespace net | 484 } // namespace net |
| OLD | NEW |