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 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
610 int SSLClientSocketPool::IdleSocketCountInGroup( | 610 int SSLClientSocketPool::IdleSocketCountInGroup( |
611 const std::string& group_name) const { | 611 const std::string& group_name) const { |
612 return base_.IdleSocketCountInGroup(group_name); | 612 return base_.IdleSocketCountInGroup(group_name); |
613 } | 613 } |
614 | 614 |
615 LoadState SSLClientSocketPool::GetLoadState( | 615 LoadState SSLClientSocketPool::GetLoadState( |
616 const std::string& group_name, const ClientSocketHandle* handle) const { | 616 const std::string& group_name, const ClientSocketHandle* handle) const { |
617 return base_.GetLoadState(group_name, handle); | 617 return base_.GetLoadState(group_name, handle); |
618 } | 618 } |
619 | 619 |
620 base::DictionaryValue* SSLClientSocketPool::GetInfoAsValue( | 620 scoped_ptr<base::DictionaryValue> SSLClientSocketPool::GetInfoAsValue( |
621 const std::string& name, | 621 const std::string& name, |
622 const std::string& type, | 622 const std::string& type, |
623 bool include_nested_pools) const { | 623 bool include_nested_pools) const { |
624 base::DictionaryValue* dict = base_.GetInfoAsValue(name, type); | 624 scoped_ptr<base::DictionaryValue> dict(base_.GetInfoAsValue(name, type)); |
625 if (include_nested_pools) { | 625 if (include_nested_pools) { |
626 base::ListValue* list = new base::ListValue(); | 626 base::ListValue* list = new base::ListValue(); |
627 if (transport_pool_) { | 627 if (transport_pool_) { |
628 list->Append(transport_pool_->GetInfoAsValue("transport_socket_pool", | 628 list->Append(transport_pool_->GetInfoAsValue("transport_socket_pool", |
629 "transport_socket_pool", | 629 "transport_socket_pool", |
630 false)); | 630 false)); |
631 } | 631 } |
632 if (socks_pool_) { | 632 if (socks_pool_) { |
633 list->Append(socks_pool_->GetInfoAsValue("socks_pool", | 633 list->Append(socks_pool_->GetInfoAsValue("socks_pool", |
634 "socks_pool", | 634 "socks_pool", |
635 true)); | 635 true)); |
636 } | 636 } |
637 if (http_proxy_pool_) { | 637 if (http_proxy_pool_) { |
638 list->Append(http_proxy_pool_->GetInfoAsValue("http_proxy_pool", | 638 list->Append(http_proxy_pool_->GetInfoAsValue("http_proxy_pool", |
639 "http_proxy_pool", | 639 "http_proxy_pool", |
640 true)); | 640 true)); |
641 } | 641 } |
642 dict->Set("nested_pools", list); | 642 dict->Set("nested_pools", list); |
643 } | 643 } |
644 return dict; | 644 return dict.Pass(); |
645 } | 645 } |
646 | 646 |
647 base::TimeDelta SSLClientSocketPool::ConnectionTimeout() const { | 647 base::TimeDelta SSLClientSocketPool::ConnectionTimeout() const { |
648 return base_.ConnectionTimeout(); | 648 return base_.ConnectionTimeout(); |
649 } | 649 } |
650 | 650 |
651 bool SSLClientSocketPool::IsStalled() const { | 651 bool SSLClientSocketPool::IsStalled() const { |
652 return base_.IsStalled(); | 652 return base_.IsStalled(); |
653 } | 653 } |
654 | 654 |
(...skipping 10 matching lines...) Expand all Loading... |
665 if (base_.CloseOneIdleSocket()) | 665 if (base_.CloseOneIdleSocket()) |
666 return true; | 666 return true; |
667 return base_.CloseOneIdleConnectionInHigherLayeredPool(); | 667 return base_.CloseOneIdleConnectionInHigherLayeredPool(); |
668 } | 668 } |
669 | 669 |
670 void SSLClientSocketPool::OnSSLConfigChanged() { | 670 void SSLClientSocketPool::OnSSLConfigChanged() { |
671 FlushWithError(ERR_NETWORK_CHANGED); | 671 FlushWithError(ERR_NETWORK_CHANGED); |
672 } | 672 } |
673 | 673 |
674 } // namespace net | 674 } // namespace net |
OLD | NEW |