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

Unified Diff: net/http/http_network_session.cc

Issue 2667293003: [OBSOLETE][memory-infra] Whitelist net dump providers in field trials (Closed)
Patch Set: fix comment. Created 3 years, 11 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
Index: net/http/http_network_session.cc
diff --git a/net/http/http_network_session.cc b/net/http/http_network_session.cc
index c64755a707212620dda5f4963330f8dd9980bd27..6bbdc1b907c635b2407fc30dd12a9ee495c77eda 100644
--- a/net/http/http_network_session.cc
+++ b/net/http/http_network_session.cc
@@ -429,13 +429,17 @@ void HttpNetworkSession::DumpMemoryStats(
spdy_session_pool_.DumpMemoryStats(
pmd, http_network_session_dump->absolute_name());
}
+
// Create an empty row under parent's dump so size can be attributed correctly
- // if |this| is shared between URLRequestContexts.
- base::trace_event::MemoryAllocatorDump* empty_row_dump =
- pmd->CreateAllocatorDump(base::StringPrintf(
- "%s/http_network_session", parent_absolute_name.c_str()));
- pmd->AddOwnershipEdge(empty_row_dump->guid(),
- http_network_session_dump->guid());
+ // if |this| is shared between URLRequestContexts. It is not required if
+ // parent details are not reported.
+ if (!parent_absolute_name.empty()) {
+ base::trace_event::MemoryAllocatorDump* empty_row_dump =
+ pmd->CreateAllocatorDump(base::StringPrintf(
+ "%s/http_network_session", parent_absolute_name.c_str()));
+ pmd->AddOwnershipEdge(empty_row_dump->guid(),
+ http_network_session_dump->guid());
+ }
}
bool HttpNetworkSession::IsQuicEnabled() const {

Powered by Google App Engine
This is Rietveld 408576698