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 "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 class TransportClientSocketPool; | 36 class TransportClientSocketPool; |
37 class TransportSecurityState; | 37 class TransportSecurityState; |
38 | 38 |
39 namespace internal { | 39 namespace internal { |
40 | 40 |
41 // A helper class for auto-deleting Values in the destructor. | 41 // A helper class for auto-deleting Values in the destructor. |
42 template <typename Key, typename Value> | 42 template <typename Key, typename Value> |
43 class OwnedPoolMap : public std::map<Key, Value> { | 43 class OwnedPoolMap : public std::map<Key, Value> { |
44 public: | 44 public: |
45 OwnedPoolMap() { | 45 OwnedPoolMap() { |
46 COMPILE_ASSERT(base::is_pointer<Value>::value, | 46 static_assert(base::is_pointer<Value>::value, "value must be a pointer"); |
47 value_must_be_a_pointer); | |
48 } | 47 } |
49 | 48 |
50 ~OwnedPoolMap() { | 49 ~OwnedPoolMap() { |
51 STLDeleteValues(this); | 50 STLDeleteValues(this); |
52 } | 51 } |
53 }; | 52 }; |
54 | 53 |
55 } // namespace internal | 54 } // namespace internal |
56 | 55 |
57 class ClientSocketPoolManagerImpl : public base::NonThreadSafe, | 56 class ClientSocketPoolManagerImpl : public base::NonThreadSafe, |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 SSLSocketPoolMap ssl_socket_pools_for_proxies_; | 151 SSLSocketPoolMap ssl_socket_pools_for_proxies_; |
153 | 152 |
154 const ProxyDelegate* proxy_delegate_; | 153 const ProxyDelegate* proxy_delegate_; |
155 | 154 |
156 DISALLOW_COPY_AND_ASSIGN(ClientSocketPoolManagerImpl); | 155 DISALLOW_COPY_AND_ASSIGN(ClientSocketPoolManagerImpl); |
157 }; | 156 }; |
158 | 157 |
159 } // namespace net | 158 } // namespace net |
160 | 159 |
161 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_MANAGER_IMPL_H_ | 160 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_MANAGER_IMPL_H_ |
OLD | NEW |