Chromium Code Reviews| Index: net/http/http_network_session.cc |
| diff --git a/net/http/http_network_session.cc b/net/http/http_network_session.cc |
| index 98c929ddb80ebd88b7bec6046596e2dccbba8bc9..fff940fec16cc3d91086e1aa72bb651beaccdd1f 100644 |
| --- a/net/http/http_network_session.cc |
| +++ b/net/http/http_network_session.cc |
| @@ -33,6 +33,10 @@ |
| #include "net/socket/ssl_client_socket.h" |
| #include "net/spdy/spdy_session_pool.h" |
| +#include "base/trace_event/memory_allocator_dump.h" |
| +#include "base/trace_event/process_memory_dump.h" |
| +#include "base/strings/stringprintf.h" |
| + |
| namespace net { |
| namespace { |
| @@ -375,6 +379,22 @@ void HttpNetworkSession::GetSSLConfig(const HttpRequestInfo& request, |
| } |
| } |
| +void HttpNetworkSession::PopulateAllocatorDump( |
| + base::trace_event::MemoryAllocatorDump* dump) const { |
|
ssid
2016/10/14 18:52:25
Maybe pass ProcessMemoryDump* here, with a root na
|
| + std::string name = base::StringPrintf("http_network_session_%p", this); |
| + //base::trace_event::MemoryAllocatorDumpGuid guid(name); |
| + base::trace_event::MemoryAllocatorDump* http_network_session_dump = |
| + dump->process_memory_dump()->GetAllocatorDump(name); |
| + if (http_network_session_dump != nullptr) { |
| + dump->process_memory_dump()->AddOwnershipEdge( |
| + dump->guid(), http_network_session_dump->guid()); |
| + return; |
| + } |
| + http_network_session_dump = dump->process_memory_dump()->CreateAllocatorDump( |
| + name); |
| + normal_socket_pool_manager_->PopulateAllocatorDump(http_network_session_dump); |
|
ssid
2016/10/14 18:52:25
The code could be:
name = root_name + "/http_requ
|
| +} |
| + |
| ClientSocketPoolManager* HttpNetworkSession::GetSocketPoolManager( |
| SocketPoolType pool_type) { |
| switch (pool_type) { |