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

Unified Diff: net/base/sdch_manager.cc

Issue 2699163002: Whitelist net/ MemoryDumpProvider (Closed)
Patch Set: fix test on windows Created 3 years, 10 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 | « base/trace_event/memory_infra_background_whitelist.cc ('k') | net/base/sdch_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/sdch_manager.cc
diff --git a/net/base/sdch_manager.cc b/net/base/sdch_manager.cc
index d577db8436c1c682fdcc0595febc39a360dd3167..11e9e3b708faa85fc83925433e9d3ed65c715145 100644
--- a/net/base/sdch_manager.cc
+++ b/net/base/sdch_manager.cc
@@ -4,6 +4,7 @@
#include "net/base/sdch_manager.h"
+#include <inttypes.h>
#include <limits.h>
#include <utility>
@@ -335,7 +336,8 @@ void SdchManager::DumpMemoryStats(
size_t total_count = dictionaries_.size();
if (total_count == 0)
return;
- std::string name = base::StringPrintf("net/sdch_manager_%p", this);
+ std::string name = base::StringPrintf("net/sdch_manager_0x%" PRIxPTR,
+ reinterpret_cast<uintptr_t>(this));
base::trace_event::MemoryAllocatorDump* dump = pmd->GetAllocatorDump(name);
if (dump == nullptr) {
dump = pmd->CreateAllocatorDump(name);
@@ -350,6 +352,7 @@ void SdchManager::DumpMemoryStats(
base::trace_event::MemoryAllocatorDump::kUnitsObjects,
total_count);
}
+
// 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 =
« no previous file with comments | « base/trace_event/memory_infra_background_whitelist.cc ('k') | net/base/sdch_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698