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

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

Issue 2541093003: Instrument SSL sockets using MemoryDumpProvider (Closed)
Patch Set: Fix flaky test 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
« no previous file with comments | « net/socket/client_socket_pool_base.cc ('k') | net/socket/client_socket_pool_manager.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 // 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 <string>
13
12 #include "net/base/completion_callback.h" 14 #include "net/base/completion_callback.h"
13 #include "net/base/net_export.h" 15 #include "net/base/net_export.h"
14 #include "net/base/request_priority.h" 16 #include "net/base/request_priority.h"
15 #include "net/http/http_network_session.h" 17 #include "net/http/http_network_session.h"
16 18
17 namespace base { 19 namespace base {
18 class Value; 20 class Value;
21 namespace trace_event {
22 class ProcessMemoryDump;
23 }
19 } 24 }
20 25
21 namespace net { 26 namespace net {
22 27
23 typedef base::Callback<int(const AddressList&, const NetLogWithSource& net_log)> 28 typedef base::Callback<int(const AddressList&, const NetLogWithSource& net_log)>
24 OnHostResolutionCallback; 29 OnHostResolutionCallback;
25 30
26 class ClientSocketHandle; 31 class ClientSocketHandle;
27 class HostPortPair; 32 class HostPortPair;
28 class HttpNetworkSession; 33 class HttpNetworkSession;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 virtual TransportClientSocketPool* GetTransportSocketPool() = 0; 81 virtual TransportClientSocketPool* GetTransportSocketPool() = 0;
77 virtual SSLClientSocketPool* GetSSLSocketPool() = 0; 82 virtual SSLClientSocketPool* GetSSLSocketPool() = 0;
78 virtual SOCKSClientSocketPool* GetSocketPoolForSOCKSProxy( 83 virtual SOCKSClientSocketPool* GetSocketPoolForSOCKSProxy(
79 const HostPortPair& socks_proxy) = 0; 84 const HostPortPair& socks_proxy) = 0;
80 virtual HttpProxyClientSocketPool* GetSocketPoolForHTTPProxy( 85 virtual HttpProxyClientSocketPool* GetSocketPoolForHTTPProxy(
81 const HostPortPair& http_proxy) = 0; 86 const HostPortPair& http_proxy) = 0;
82 virtual SSLClientSocketPool* GetSocketPoolForSSLWithProxy( 87 virtual SSLClientSocketPool* GetSocketPoolForSSLWithProxy(
83 const HostPortPair& proxy_server) = 0; 88 const HostPortPair& proxy_server) = 0;
84 // Creates a Value summary of the state of the socket pools. 89 // Creates a Value summary of the state of the socket pools.
85 virtual std::unique_ptr<base::Value> SocketPoolInfoToValue() const = 0; 90 virtual std::unique_ptr<base::Value> SocketPoolInfoToValue() const = 0;
91
92 // Dumps memory allocation stats. |parent_dump_absolute_name| is the name
93 // used by the parent MemoryAllocatorDump in the memory dump hierarchy.
94 virtual void DumpMemoryStats(
95 base::trace_event::ProcessMemoryDump* pmd,
96 const std::string& parent_dump_absolute_name) const = 0;
86 }; 97 };
87 98
88 // A helper method that uses the passed in proxy information to initialize a 99 // A helper method that uses the passed in proxy information to initialize a
89 // ClientSocketHandle with the relevant socket pool. Use this method for 100 // ClientSocketHandle with the relevant socket pool. Use this method for
90 // HTTP/HTTPS requests. |ssl_config_for_origin| is only used if the request 101 // 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. 102 // 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 103 // |resolution_callback| will be invoked after the the hostname is
93 // resolved. If |resolution_callback| does not return OK, then the 104 // resolved. If |resolution_callback| does not return OK, then the
94 // connection will be aborted with that value. 105 // connection will be aborted with that value.
95 // If |expect_spdy| is true, then after the SSL handshake is complete, 106 // 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, 191 bool expect_spdy,
181 const SSLConfig& ssl_config_for_origin, 192 const SSLConfig& ssl_config_for_origin,
182 const SSLConfig& ssl_config_for_proxy, 193 const SSLConfig& ssl_config_for_proxy,
183 PrivacyMode privacy_mode, 194 PrivacyMode privacy_mode,
184 const NetLogWithSource& net_log, 195 const NetLogWithSource& net_log,
185 int num_preconnect_streams); 196 int num_preconnect_streams);
186 197
187 } // namespace net 198 } // namespace net
188 199
189 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_MANAGER_H_ 200 #endif // NET_SOCKET_CLIENT_SOCKET_POOL_MANAGER_H_
OLDNEW
« no previous file with comments | « net/socket/client_socket_pool_base.cc ('k') | net/socket/client_socket_pool_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698