Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(412)

Side by Side Diff: net/socket/client_socket_pool_manager_impl.h

Issue 826973002: replace COMPILE_ASSERT with static_assert in net/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: apply fixups Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/socket/client_socket_pool_manager.cc ('k') | net/socket/socks5_client_socket.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « net/socket/client_socket_pool_manager.cc ('k') | net/socket/socks5_client_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698