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

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

Issue 2525743002: Make URLRequestContext a MemoryDumpProvider (Abandoned) (Closed)
Patch Set: self review Created 4 years 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 // ClientSocketPoolManager manages access to all ClientSocketPools. It's a 5 // ClientSocketPoolManager manages access to all ClientSocketPools. It's a
6 // simple container for all of them. Most importantly, it handles the lifetime 6 // simple container for all of them. Most importantly, it handles the lifetime
7 // and destruction order properly. 7 // and destruction order properly.
8 8
9 #ifndef NET_SOCKET_CLIENT_SOCKET_POOL_MANAGER_H_ 9 #ifndef NET_SOCKET_CLIENT_SOCKET_POOL_MANAGER_H_
10 #define NET_SOCKET_CLIENT_SOCKET_POOL_MANAGER_H_ 10 #define NET_SOCKET_CLIENT_SOCKET_POOL_MANAGER_H_
11 11
12 #include "net/base/completion_callback.h" 12 #include "net/base/completion_callback.h"
13 #include "net/base/net_export.h" 13 #include "net/base/net_export.h"
14 #include "net/base/request_priority.h" 14 #include "net/base/request_priority.h"
15 #include "net/http/http_network_session.h" 15 #include "net/http/http_network_session.h"
16 16
17 namespace base { 17 namespace base {
18 class Value; 18 class Value;
19 namespace trace_event {
20 class MemoryAllocatorDump;
21 }
19 } 22 }
20 23
21 namespace net { 24 namespace net {
22 25
23 typedef base::Callback<int(const AddressList&, const NetLogWithSource& net_log)> 26 typedef base::Callback<int(const AddressList&, const NetLogWithSource& net_log)>
24 OnHostResolutionCallback; 27 OnHostResolutionCallback;
25 28
26 class ClientSocketHandle; 29 class ClientSocketHandle;
27 class HostPortPair; 30 class HostPortPair;
28 class HttpNetworkSession; 31 class HttpNetworkSession;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 virtual TransportClientSocketPool* GetTransportSocketPool() = 0; 79 virtual TransportClientSocketPool* GetTransportSocketPool() = 0;
77 virtual SSLClientSocketPool* GetSSLSocketPool() = 0; 80 virtual SSLClientSocketPool* GetSSLSocketPool() = 0;
78 virtual SOCKSClientSocketPool* GetSocketPoolForSOCKSProxy( 81 virtual SOCKSClientSocketPool* GetSocketPoolForSOCKSProxy(
79 const HostPortPair& socks_proxy) = 0; 82 const HostPortPair& socks_proxy) = 0;
80 virtual HttpProxyClientSocketPool* GetSocketPoolForHTTPProxy( 83 virtual HttpProxyClientSocketPool* GetSocketPoolForHTTPProxy(
81 const HostPortPair& http_proxy) = 0; 84 const HostPortPair& http_proxy) = 0;
82 virtual SSLClientSocketPool* GetSocketPoolForSSLWithProxy( 85 virtual SSLClientSocketPool* GetSocketPoolForSSLWithProxy(
83 const HostPortPair& proxy_server) = 0; 86 const HostPortPair& proxy_server) = 0;
84 // Creates a Value summary of the state of the socket pools. 87 // Creates a Value summary of the state of the socket pools.
85 virtual std::unique_ptr<base::Value> SocketPoolInfoToValue() const = 0; 88 virtual std::unique_ptr<base::Value> SocketPoolInfoToValue() const = 0;
89 virtual void DumpMemoryStats(
90 base::trace_event::MemoryAllocatorDump* dump) const = 0;
ssid 2016/12/02 21:36:35 I think this should be: virtual void DumpMemorySta
86 }; 91 };
87 92
88 // A helper method that uses the passed in proxy information to initialize a 93 // A helper method that uses the passed in proxy information to initialize a
89 // ClientSocketHandle with the relevant socket pool. Use this method for 94 // ClientSocketHandle with the relevant socket pool. Use this method for
90 // HTTP/HTTPS requests. |ssl_config_for_origin| is only used if the request 95 // HTTP/HTTPS requests. |ssl_config_for_origin| is only used if the request
91 // uses SSL and |ssl_config_for_proxy| is used if the proxy server is HTTPS. 96 // uses SSL and |ssl_config_for_proxy| is used if the proxy server is HTTPS.
92 // |resolution_callback| will be invoked after the the hostname is 97 // |resolution_callback| will be invoked after the the hostname is
93 // resolved. If |resolution_callback| does not return OK, then the 98 // resolved. If |resolution_callback| does not return OK, then the
94 // connection will be aborted with that value. 99 // connection will be aborted with that value.
95 // If |expect_spdy| is true, then after the SSL handshake is complete, 100 // If |expect_spdy| is true, then after the SSL handshake is complete,
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 bool expect_spdy, 185 bool expect_spdy,
181 const SSLConfig& ssl_config_for_origin, 186 const SSLConfig& ssl_config_for_origin,
182 const SSLConfig& ssl_config_for_proxy, 187 const SSLConfig& ssl_config_for_proxy,
183 PrivacyMode privacy_mode, 188 PrivacyMode privacy_mode,
184 const NetLogWithSource& net_log, 189 const NetLogWithSource& net_log,
185 int num_preconnect_streams); 190 int num_preconnect_streams);
186 191
187 } // namespace net 192 } // namespace net
188 193
189 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_MANAGER_H_ 194 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698