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

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

Issue 2229393003: net: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 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_base.cc ('k') | net/socket/client_socket_pool_manager_impl.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 <memory> 9 #include <memory>
10 #include <type_traits> 10 #include <type_traits>
(...skipping 26 matching lines...) Expand all
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 static_assert(std::is_pointer<Value>::value, "value must be a pointer"); 44 static_assert(std::is_pointer<Value>::value, "value must be a pointer");
45 } 45 }
46 46
47 ~OwnedPoolMap() { 47 ~OwnedPoolMap() { base::STLDeleteValues(this); }
48 STLDeleteValues(this);
49 }
50 }; 48 };
51 49
52 } // namespace internal 50 } // namespace internal
53 51
54 class ClientSocketPoolManagerImpl : public base::NonThreadSafe, 52 class ClientSocketPoolManagerImpl : public base::NonThreadSafe,
55 public ClientSocketPoolManager, 53 public ClientSocketPoolManager,
56 public CertDatabase::Observer { 54 public CertDatabase::Observer {
57 public: 55 public:
58 ClientSocketPoolManagerImpl( 56 ClientSocketPoolManagerImpl(
59 NetLog* net_log, 57 NetLog* net_log,
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 SSLSocketPoolMap ssl_socket_pools_for_https_proxies_; 125 SSLSocketPoolMap ssl_socket_pools_for_https_proxies_;
128 HTTPProxySocketPoolMap http_proxy_socket_pools_; 126 HTTPProxySocketPoolMap http_proxy_socket_pools_;
129 SSLSocketPoolMap ssl_socket_pools_for_proxies_; 127 SSLSocketPoolMap ssl_socket_pools_for_proxies_;
130 128
131 DISALLOW_COPY_AND_ASSIGN(ClientSocketPoolManagerImpl); 129 DISALLOW_COPY_AND_ASSIGN(ClientSocketPoolManagerImpl);
132 }; 130 };
133 131
134 } // namespace net 132 } // namespace net
135 133
136 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_MANAGER_IMPL_H_ 134 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_MANAGER_IMPL_H_
OLDNEW
« no previous file with comments | « net/socket/client_socket_pool_base.cc ('k') | net/socket/client_socket_pool_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698