| 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 23 matching lines...) Expand all Loading... |
| 34 class TransportClientSocketPool; | 34 class TransportClientSocketPool; |
| 35 class TransportSecurityState; | 35 class TransportSecurityState; |
| 36 | 36 |
| 37 namespace internal { | 37 namespace internal { |
| 38 | 38 |
| 39 // A helper class for auto-deleting Values in the destructor. | 39 // A helper class for auto-deleting Values in the destructor. |
| 40 template <typename Key, typename Value> | 40 template <typename Key, typename Value> |
| 41 class OwnedPoolMap : public std::map<Key, Value> { | 41 class OwnedPoolMap : public std::map<Key, Value> { |
| 42 public: | 42 public: |
| 43 OwnedPoolMap() { | 43 OwnedPoolMap() { |
| 44 COMPILE_ASSERT(base::is_pointer<Value>::value, | 44 static_assert(base::is_pointer<Value>::value, "value must be a pointer"); |
| 45 value_must_be_a_pointer); | |
| 46 } | 45 } |
| 47 | 46 |
| 48 ~OwnedPoolMap() { | 47 ~OwnedPoolMap() { |
| 49 STLDeleteValues(this); | 48 STLDeleteValues(this); |
| 50 } | 49 } |
| 51 }; | 50 }; |
| 52 | 51 |
| 53 } // namespace internal | 52 } // namespace internal |
| 54 | 53 |
| 55 class ClientSocketPoolManagerImpl : public base::NonThreadSafe, | 54 class ClientSocketPoolManagerImpl : public base::NonThreadSafe, |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 | 144 |
| 146 ClientSocketPoolHistograms ssl_socket_pool_for_proxies_histograms_; | 145 ClientSocketPoolHistograms ssl_socket_pool_for_proxies_histograms_; |
| 147 SSLSocketPoolMap ssl_socket_pools_for_proxies_; | 146 SSLSocketPoolMap ssl_socket_pools_for_proxies_; |
| 148 | 147 |
| 149 DISALLOW_COPY_AND_ASSIGN(ClientSocketPoolManagerImpl); | 148 DISALLOW_COPY_AND_ASSIGN(ClientSocketPoolManagerImpl); |
| 150 }; | 149 }; |
| 151 | 150 |
| 152 } // namespace net | 151 } // namespace net |
| 153 | 152 |
| 154 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_MANAGER_IMPL_H_ | 153 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_MANAGER_IMPL_H_ |
| OLD | NEW |