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

Unified Diff: net/url_request/url_request_context.cc

Issue 2667293003: [OBSOLETE][memory-infra] Whitelist net dump providers in field trials (Closed)
Patch Set: 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
« no previous file with comments | « net/http/http_network_session.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_context.cc
diff --git a/net/url_request/url_request_context.cc b/net/url_request/url_request_context.cc
index cefa7b9db2593c3e0abc8ed1d39485fef36e267b..f7207e9a16b45efd25b321c0d6cb7aed120587c2 100644
--- a/net/url_request/url_request_context.cc
+++ b/net/url_request/url_request_context.cc
@@ -127,20 +127,30 @@ bool URLRequestContext::OnMemoryDump(
base::trace_event::ProcessMemoryDump* pmd) {
if (name_.empty())
name_ = "unknown";
- base::trace_event::MemoryAllocatorDump* dump = pmd->CreateAllocatorDump(
- base::StringPrintf("net/url_request_context/%s_%p", name_.c_str(), this));
- dump->AddScalar(base::trace_event::MemoryAllocatorDump::kNameObjectCount,
- base::trace_event::MemoryAllocatorDump::kUnitsObjects,
- url_requests_->size());
+
+ SSLClientSocketImpl::DumpSSLClientSessionMemoryStats(pmd);
+
+ // The details about the url request name is not added in BACKGROUND mode
xunjieli 2017/02/02 22:33:27 nit: s/is/are Think you meant to say "url request
ssid 2017/02/03 02:26:00 Done.
+ // dumps.
+ std::string dump_name;
+ if (args.level_of_detail !=
+ base::trace_event::MemoryDumpLevelOfDetail::BACKGROUND) {
+ dump_name = base::StringPrintf("net/url_request_context/%s_%p",
xunjieli 2017/02/02 22:33:27 I was about to instrument net::URLRequest and attr
ssid 2017/02/02 23:24:57 I see. I removed the url_requet_context dumps beca
xunjieli 2017/02/02 23:41:06 I see. I seriously wonder whether there is an end
+ name_.c_str(), this);
+ base::trace_event::MemoryAllocatorDump* dump =
+ pmd->CreateAllocatorDump(dump_name);
+ dump->AddScalar(base::trace_event::MemoryAllocatorDump::kNameObjectCount,
+ base::trace_event::MemoryAllocatorDump::kUnitsObjects,
+ url_requests_->size());
+ }
HttpTransactionFactory* transaction_factory = http_transaction_factory();
if (transaction_factory) {
HttpNetworkSession* network_session = transaction_factory->GetSession();
if (network_session)
- network_session->DumpMemoryStats(pmd, dump->absolute_name());
+ network_session->DumpMemoryStats(pmd, dump_name);
}
- SSLClientSocketImpl::DumpSSLClientSessionMemoryStats(pmd);
if (sdch_manager_)
- sdch_manager_->DumpMemoryStats(pmd, dump->absolute_name());
+ sdch_manager_->DumpMemoryStats(pmd, dump_name);
return true;
}
« no previous file with comments | « net/http/http_network_session.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698