Chromium Code Reviews| Index: components/leveldb_proto/leveldb_database.cc |
| diff --git a/components/leveldb_proto/leveldb_database.cc b/components/leveldb_proto/leveldb_database.cc |
| index 5769710cb170a517364e92289b4e9aa701092aea..72937147a88eec49fe56fae2858a97a8b3668e54 100644 |
| --- a/components/leveldb_proto/leveldb_database.cc |
| +++ b/components/leveldb_proto/leveldb_database.cc |
| @@ -187,8 +187,11 @@ bool LevelDB::OnMemoryDump(const base::trace_event::MemoryDumpArgs& dump_args, |
| res = base::StringToUint64(value, &size); |
| DCHECK(res); |
| + std::string dump_name = "leveldb/leveldb_proto"; |
| + if (!client_name_.empty()) |
| + dump_name += "/" + client_name_; |
|
Primiano Tucci (use gerrit)
2016/10/07 02:25:56
can this have weird chars or /, or is it just fixe
ssid
2016/10/07 19:02:23
All these strings are static strings defined as na
|
| base::trace_event::MemoryAllocatorDump* dump = pmd->CreateAllocatorDump( |
| - base::StringPrintf("leveldb/leveldb_proto/0x%" PRIXPTR, |
| + base::StringPrintf("%s/0x%" PRIXPTR, dump_name.c_str(), |
| reinterpret_cast<uintptr_t>(db_.get()))); |
| dump->AddScalar(base::trace_event::MemoryAllocatorDump::kNameSize, |
| base::trace_event::MemoryAllocatorDump::kUnitsBytes, size); |