| 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 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 523 void SSLClientSocketPool::CancelRequest(const std::string& group_name, | 523 void SSLClientSocketPool::CancelRequest(const std::string& group_name, |
| 524 ClientSocketHandle* handle) { | 524 ClientSocketHandle* handle) { |
| 525 base_.CancelRequest(group_name, handle); | 525 base_.CancelRequest(group_name, handle); |
| 526 } | 526 } |
| 527 | 527 |
| 528 void SSLClientSocketPool::ReleaseSocket(const std::string& group_name, | 528 void SSLClientSocketPool::ReleaseSocket(const std::string& group_name, |
| 529 StreamSocket* socket, int id) { | 529 StreamSocket* socket, int id) { |
| 530 base_.ReleaseSocket(group_name, socket, id); | 530 base_.ReleaseSocket(group_name, socket, id); |
| 531 } | 531 } |
| 532 | 532 |
| 533 void SSLClientSocketPool::Flush() { | 533 void SSLClientSocketPool::FlushWithError(int error) { |
| 534 base_.Flush(); | 534 base_.FlushWithError(error); |
| 535 } | 535 } |
| 536 | 536 |
| 537 bool SSLClientSocketPool::IsStalled() const { | 537 bool SSLClientSocketPool::IsStalled() const { |
| 538 return base_.IsStalled() || | 538 return base_.IsStalled() || |
| 539 (transport_pool_ && transport_pool_->IsStalled()) || | 539 (transport_pool_ && transport_pool_->IsStalled()) || |
| 540 (socks_pool_ && socks_pool_->IsStalled()) || | 540 (socks_pool_ && socks_pool_->IsStalled()) || |
| 541 (http_proxy_pool_ && http_proxy_pool_->IsStalled()); | 541 (http_proxy_pool_ && http_proxy_pool_->IsStalled()); |
| 542 } | 542 } |
| 543 | 543 |
| 544 void SSLClientSocketPool::CloseIdleSockets() { | 544 void SSLClientSocketPool::CloseIdleSockets() { |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 596 | 596 |
| 597 base::TimeDelta SSLClientSocketPool::ConnectionTimeout() const { | 597 base::TimeDelta SSLClientSocketPool::ConnectionTimeout() const { |
| 598 return base_.ConnectionTimeout(); | 598 return base_.ConnectionTimeout(); |
| 599 } | 599 } |
| 600 | 600 |
| 601 ClientSocketPoolHistograms* SSLClientSocketPool::histograms() const { | 601 ClientSocketPoolHistograms* SSLClientSocketPool::histograms() const { |
| 602 return base_.histograms(); | 602 return base_.histograms(); |
| 603 } | 603 } |
| 604 | 604 |
| 605 void SSLClientSocketPool::OnSSLConfigChanged() { | 605 void SSLClientSocketPool::OnSSLConfigChanged() { |
| 606 Flush(); | 606 FlushWithError(ERR_NETWORK_CHANGED); |
| 607 } | 607 } |
| 608 | 608 |
| 609 bool SSLClientSocketPool::CloseOneIdleConnection() { | 609 bool SSLClientSocketPool::CloseOneIdleConnection() { |
| 610 if (base_.CloseOneIdleSocket()) | 610 if (base_.CloseOneIdleSocket()) |
| 611 return true; | 611 return true; |
| 612 return base_.CloseOneIdleConnectionInLayeredPool(); | 612 return base_.CloseOneIdleConnectionInLayeredPool(); |
| 613 } | 613 } |
| 614 | 614 |
| 615 } // namespace net | 615 } // namespace net |
| OLD | NEW |