| OLD | NEW |
| 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 #include "net/socket/socks_client_socket_pool.h" | 5 #include "net/socket/socks_client_socket_pool.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/time.h" | 9 #include "base/time.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 } | 269 } |
| 270 | 270 |
| 271 void SOCKSClientSocketPool::AddLayeredPool(LayeredPool* layered_pool) { | 271 void SOCKSClientSocketPool::AddLayeredPool(LayeredPool* layered_pool) { |
| 272 base_.AddLayeredPool(layered_pool); | 272 base_.AddLayeredPool(layered_pool); |
| 273 } | 273 } |
| 274 | 274 |
| 275 void SOCKSClientSocketPool::RemoveLayeredPool(LayeredPool* layered_pool) { | 275 void SOCKSClientSocketPool::RemoveLayeredPool(LayeredPool* layered_pool) { |
| 276 base_.RemoveLayeredPool(layered_pool); | 276 base_.RemoveLayeredPool(layered_pool); |
| 277 } | 277 } |
| 278 | 278 |
| 279 DictionaryValue* SOCKSClientSocketPool::GetInfoAsValue( | 279 base::DictionaryValue* SOCKSClientSocketPool::GetInfoAsValue( |
| 280 const std::string& name, | 280 const std::string& name, |
| 281 const std::string& type, | 281 const std::string& type, |
| 282 bool include_nested_pools) const { | 282 bool include_nested_pools) const { |
| 283 DictionaryValue* dict = base_.GetInfoAsValue(name, type); | 283 base::DictionaryValue* dict = base_.GetInfoAsValue(name, type); |
| 284 if (include_nested_pools) { | 284 if (include_nested_pools) { |
| 285 ListValue* list = new ListValue(); | 285 base::ListValue* list = new base::ListValue(); |
| 286 list->Append(transport_pool_->GetInfoAsValue("transport_socket_pool", | 286 list->Append(transport_pool_->GetInfoAsValue("transport_socket_pool", |
| 287 "transport_socket_pool", | 287 "transport_socket_pool", |
| 288 false)); | 288 false)); |
| 289 dict->Set("nested_pools", list); | 289 dict->Set("nested_pools", list); |
| 290 } | 290 } |
| 291 return dict; | 291 return dict; |
| 292 } | 292 } |
| 293 | 293 |
| 294 base::TimeDelta SOCKSClientSocketPool::ConnectionTimeout() const { | 294 base::TimeDelta SOCKSClientSocketPool::ConnectionTimeout() const { |
| 295 return base_.ConnectionTimeout(); | 295 return base_.ConnectionTimeout(); |
| 296 } | 296 } |
| 297 | 297 |
| 298 ClientSocketPoolHistograms* SOCKSClientSocketPool::histograms() const { | 298 ClientSocketPoolHistograms* SOCKSClientSocketPool::histograms() const { |
| 299 return base_.histograms(); | 299 return base_.histograms(); |
| 300 }; | 300 }; |
| 301 | 301 |
| 302 bool SOCKSClientSocketPool::CloseOneIdleConnection() { | 302 bool SOCKSClientSocketPool::CloseOneIdleConnection() { |
| 303 if (base_.CloseOneIdleSocket()) | 303 if (base_.CloseOneIdleSocket()) |
| 304 return true; | 304 return true; |
| 305 return base_.CloseOneIdleConnectionInLayeredPool(); | 305 return base_.CloseOneIdleConnectionInLayeredPool(); |
| 306 } | 306 } |
| 307 | 307 |
| 308 } // namespace net | 308 } // namespace net |
| OLD | NEW |