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

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

Issue 2541093003: Instrument SSL sockets using MemoryDumpProvider (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
90 // Dumps memory allocation stats. |parent_dump| is the MemoryAllocatorDump of
91 // the parent in the memory dump hierarchy.
92 virtual void DumpMemoryStats(
93 base::trace_event::MemoryAllocatorDump* parent_dump) const = 0;
86 }; 94 };
87 95
88 // A helper method that uses the passed in proxy information to initialize a 96 // A helper method that uses the passed in proxy information to initialize a
89 // ClientSocketHandle with the relevant socket pool. Use this method for 97 // ClientSocketHandle with the relevant socket pool. Use this method for
90 // HTTP/HTTPS requests. |ssl_config_for_origin| is only used if the request 98 // 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. 99 // 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 100 // |resolution_callback| will be invoked after the the hostname is
93 // resolved. If |resolution_callback| does not return OK, then the 101 // resolved. If |resolution_callback| does not return OK, then the
94 // connection will be aborted with that value. 102 // connection will be aborted with that value.
95 // If |expect_spdy| is true, then after the SSL handshake is complete, 103 // 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, 188 bool expect_spdy,
181 const SSLConfig& ssl_config_for_origin, 189 const SSLConfig& ssl_config_for_origin,
182 const SSLConfig& ssl_config_for_proxy, 190 const SSLConfig& ssl_config_for_proxy,
183 PrivacyMode privacy_mode, 191 PrivacyMode privacy_mode,
184 const NetLogWithSource& net_log, 192 const NetLogWithSource& net_log,
185 int num_preconnect_streams); 193 int num_preconnect_streams);
186 194
187 } // namespace net 195 } // namespace net
188 196
189 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_MANAGER_H_ 197 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698