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> |
625 dict(base_.GetInfoAsValue(name, type).Pass()); | |
eroman
2015/06/01 17:07:23
No need for Pass
| |
625 if (include_nested_pools) { | 626 if (include_nested_pools) { |
626 base::ListValue* list = new base::ListValue(); | 627 base::ListValue* list = new base::ListValue(); |
627 if (transport_pool_) { | 628 if (transport_pool_) { |
628 list->Append(transport_pool_->GetInfoAsValue("transport_socket_pool", | 629 list->Append(transport_pool_->GetInfoAsValue("transport_socket_pool", |
629 "transport_socket_pool", | 630 "transport_socket_pool", |
630 false)); | 631 false)); |
631 } | 632 } |
632 if (socks_pool_) { | 633 if (socks_pool_) { |
633 list->Append(socks_pool_->GetInfoAsValue("socks_pool", | 634 list->Append(socks_pool_->GetInfoAsValue("socks_pool", |
634 "socks_pool", | 635 "socks_pool", |
635 true)); | 636 true)); |
636 } | 637 } |
637 if (http_proxy_pool_) { | 638 if (http_proxy_pool_) { |
638 list->Append(http_proxy_pool_->GetInfoAsValue("http_proxy_pool", | 639 list->Append(http_proxy_pool_->GetInfoAsValue("http_proxy_pool", |
639 "http_proxy_pool", | 640 "http_proxy_pool", |
640 true)); | 641 true)); |
641 } | 642 } |
642 dict->Set("nested_pools", list); | 643 dict->Set("nested_pools", list); |
643 } | 644 } |
644 return dict; | 645 return dict.Pass(); |
645 } | 646 } |
646 | 647 |
647 base::TimeDelta SSLClientSocketPool::ConnectionTimeout() const { | 648 base::TimeDelta SSLClientSocketPool::ConnectionTimeout() const { |
648 return base_.ConnectionTimeout(); | 649 return base_.ConnectionTimeout(); |
649 } | 650 } |
650 | 651 |
651 bool SSLClientSocketPool::IsStalled() const { | 652 bool SSLClientSocketPool::IsStalled() const { |
652 return base_.IsStalled(); | 653 return base_.IsStalled(); |
653 } | 654 } |
654 | 655 |
(...skipping 10 matching lines...) Expand all Loading... | |
665 if (base_.CloseOneIdleSocket()) | 666 if (base_.CloseOneIdleSocket()) |
666 return true; | 667 return true; |
667 return base_.CloseOneIdleConnectionInHigherLayeredPool(); | 668 return base_.CloseOneIdleConnectionInHigherLayeredPool(); |
668 } | 669 } |
669 | 670 |
670 void SSLClientSocketPool::OnSSLConfigChanged() { | 671 void SSLClientSocketPool::OnSSLConfigChanged() { |
671 FlushWithError(ERR_NETWORK_CHANGED); | 672 FlushWithError(ERR_NETWORK_CHANGED); |
672 } | 673 } |
673 | 674 |
674 } // namespace net | 675 } // namespace net |
OLD | NEW |