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

Unified Diff: net/http/http_network_session.cc

Issue 2414883005: TEMP DO NOT LAND (Closed)
Patch Set: temp Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_network_session.h ('k') | net/socket/client_socket_pool.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « net/http/http_network_session.h ('k') | net/socket/client_socket_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698