| 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 #ifndef NET_SOCKET_CLIENT_SOCKET_POOL_MANAGER_IMPL_H_ | 5 #ifndef NET_SOCKET_CLIENT_SOCKET_POOL_MANAGER_IMPL_H_ |
| 6 #define NET_SOCKET_CLIENT_SOCKET_POOL_MANAGER_IMPL_H_ | 6 #define NET_SOCKET_CLIENT_SOCKET_POOL_MANAGER_IMPL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <type_traits> |
| 10 |
| 9 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 10 #include "base/macros.h" | 12 #include "base/macros.h" |
| 11 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 12 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/stl_util.h" | 15 #include "base/stl_util.h" |
| 14 #include "base/template_util.h" | |
| 15 #include "base/threading/non_thread_safe.h" | 16 #include "base/threading/non_thread_safe.h" |
| 16 #include "net/cert/cert_database.h" | 17 #include "net/cert/cert_database.h" |
| 17 #include "net/http/http_network_session.h" | 18 #include "net/http/http_network_session.h" |
| 18 #include "net/socket/client_socket_pool_manager.h" | 19 #include "net/socket/client_socket_pool_manager.h" |
| 19 | 20 |
| 20 namespace net { | 21 namespace net { |
| 21 | 22 |
| 22 class CertVerifier; | 23 class CertVerifier; |
| 23 class ChannelIDService; | 24 class ChannelIDService; |
| 24 class ClientSocketFactory; | 25 class ClientSocketFactory; |
| 25 class CTVerifier; | 26 class CTVerifier; |
| 26 class HttpProxyClientSocketPool; | 27 class HttpProxyClientSocketPool; |
| 27 class HostResolver; | 28 class HostResolver; |
| 28 class NetLog; | 29 class NetLog; |
| 29 class SOCKSClientSocketPool; | 30 class SOCKSClientSocketPool; |
| 30 class SSLClientSocketPool; | 31 class SSLClientSocketPool; |
| 31 class SSLConfigService; | 32 class SSLConfigService; |
| 32 class TransportClientSocketPool; | 33 class TransportClientSocketPool; |
| 33 class TransportSecurityState; | 34 class TransportSecurityState; |
| 34 | 35 |
| 35 namespace internal { | 36 namespace internal { |
| 36 | 37 |
| 37 // A helper class for auto-deleting Values in the destructor. | 38 // A helper class for auto-deleting Values in the destructor. |
| 38 template <typename Key, typename Value> | 39 template <typename Key, typename Value> |
| 39 class OwnedPoolMap : public std::map<Key, Value> { | 40 class OwnedPoolMap : public std::map<Key, Value> { |
| 40 public: | 41 public: |
| 41 OwnedPoolMap() { | 42 OwnedPoolMap() { |
| 42 static_assert(base::is_pointer<Value>::value, "value must be a pointer"); | 43 static_assert(std::is_pointer<Value>::value, "value must be a pointer"); |
| 43 } | 44 } |
| 44 | 45 |
| 45 ~OwnedPoolMap() { | 46 ~OwnedPoolMap() { |
| 46 STLDeleteValues(this); | 47 STLDeleteValues(this); |
| 47 } | 48 } |
| 48 }; | 49 }; |
| 49 | 50 |
| 50 } // namespace internal | 51 } // namespace internal |
| 51 | 52 |
| 52 class ClientSocketPoolManagerImpl : public base::NonThreadSafe, | 53 class ClientSocketPoolManagerImpl : public base::NonThreadSafe, |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 SSLSocketPoolMap ssl_socket_pools_for_https_proxies_; | 123 SSLSocketPoolMap ssl_socket_pools_for_https_proxies_; |
| 123 HTTPProxySocketPoolMap http_proxy_socket_pools_; | 124 HTTPProxySocketPoolMap http_proxy_socket_pools_; |
| 124 SSLSocketPoolMap ssl_socket_pools_for_proxies_; | 125 SSLSocketPoolMap ssl_socket_pools_for_proxies_; |
| 125 | 126 |
| 126 DISALLOW_COPY_AND_ASSIGN(ClientSocketPoolManagerImpl); | 127 DISALLOW_COPY_AND_ASSIGN(ClientSocketPoolManagerImpl); |
| 127 }; | 128 }; |
| 128 | 129 |
| 129 } // namespace net | 130 } // namespace net |
| 130 | 131 |
| 131 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_MANAGER_IMPL_H_ | 132 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_MANAGER_IMPL_H_ |
| OLD | NEW |