| 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/ssl_client_socket_pool.h" | 5 #include "net/socket/ssl_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/metrics/field_trial.h" | 9 #include "base/metrics/field_trial.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 576 } | 576 } |
| 577 | 577 |
| 578 void SSLClientSocketPool::AddLayeredPool(LayeredPool* layered_pool) { | 578 void SSLClientSocketPool::AddLayeredPool(LayeredPool* layered_pool) { |
| 579 base_.AddLayeredPool(layered_pool); | 579 base_.AddLayeredPool(layered_pool); |
| 580 } | 580 } |
| 581 | 581 |
| 582 void SSLClientSocketPool::RemoveLayeredPool(LayeredPool* layered_pool) { | 582 void SSLClientSocketPool::RemoveLayeredPool(LayeredPool* layered_pool) { |
| 583 base_.RemoveLayeredPool(layered_pool); | 583 base_.RemoveLayeredPool(layered_pool); |
| 584 } | 584 } |
| 585 | 585 |
| 586 DictionaryValue* SSLClientSocketPool::GetInfoAsValue( | 586 base::DictionaryValue* SSLClientSocketPool::GetInfoAsValue( |
| 587 const std::string& name, | 587 const std::string& name, |
| 588 const std::string& type, | 588 const std::string& type, |
| 589 bool include_nested_pools) const { | 589 bool include_nested_pools) const { |
| 590 DictionaryValue* dict = base_.GetInfoAsValue(name, type); | 590 base::DictionaryValue* dict = base_.GetInfoAsValue(name, type); |
| 591 if (include_nested_pools) { | 591 if (include_nested_pools) { |
| 592 ListValue* list = new ListValue(); | 592 base::ListValue* list = new base::ListValue(); |
| 593 if (transport_pool_) { | 593 if (transport_pool_) { |
| 594 list->Append(transport_pool_->GetInfoAsValue("transport_socket_pool", | 594 list->Append(transport_pool_->GetInfoAsValue("transport_socket_pool", |
| 595 "transport_socket_pool", | 595 "transport_socket_pool", |
| 596 false)); | 596 false)); |
| 597 } | 597 } |
| 598 if (socks_pool_) { | 598 if (socks_pool_) { |
| 599 list->Append(socks_pool_->GetInfoAsValue("socks_pool", | 599 list->Append(socks_pool_->GetInfoAsValue("socks_pool", |
| 600 "socks_pool", | 600 "socks_pool", |
| 601 true)); | 601 true)); |
| 602 } | 602 } |
| (...skipping 19 matching lines...) Expand all Loading... |
| 622 FlushWithError(ERR_NETWORK_CHANGED); | 622 FlushWithError(ERR_NETWORK_CHANGED); |
| 623 } | 623 } |
| 624 | 624 |
| 625 bool SSLClientSocketPool::CloseOneIdleConnection() { | 625 bool SSLClientSocketPool::CloseOneIdleConnection() { |
| 626 if (base_.CloseOneIdleSocket()) | 626 if (base_.CloseOneIdleSocket()) |
| 627 return true; | 627 return true; |
| 628 return base_.CloseOneIdleConnectionInLayeredPool(); | 628 return base_.CloseOneIdleConnectionInLayeredPool(); |
| 629 } | 629 } |
| 630 | 630 |
| 631 } // namespace net | 631 } // namespace net |
| OLD | NEW |