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

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

Issue 862133002: Update from https://crrev.com/312398 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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
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 23 matching lines...) Expand all
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698