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

Unified Diff: base/trace_event/memory_dump_manager.cc

Issue 1486333002: Kill ScopedPtrMap and friends (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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: base/trace_event/memory_dump_manager.cc
diff --git a/base/trace_event/memory_dump_manager.cc b/base/trace_event/memory_dump_manager.cc
index f15f56e06521853c5e037d3d791431a8f60dc0d2..cbce21021c08a599fa6f6d23db007de8d8bad7b4 100644
--- a/base/trace_event/memory_dump_manager.cc
+++ b/base/trace_event/memory_dump_manager.cc
@@ -456,7 +456,7 @@ void MemoryDumpManager::FinalizeDumpAndAddToTrace(
for (const auto& kv : pmd_async_state->process_dumps) {
ProcessId pid = kv.first; // kNullProcessId for the current process.
- ProcessMemoryDump* process_memory_dump = kv.second;
+ ProcessMemoryDump* process_memory_dump = kv.second.get();
TracedValue* traced_value = new TracedValue();
scoped_refptr<ConvertableToTraceFormat> event_value(traced_value);
process_memory_dump->AsValueInto(traced_value);
@@ -651,9 +651,9 @@ ProcessMemoryDump* MemoryDumpManager::ProcessMemoryDumpAsyncState::
auto iter = process_dumps.find(pid);
if (iter == process_dumps.end()) {
scoped_ptr<ProcessMemoryDump> new_pmd(new ProcessMemoryDump(session_state));
- iter = process_dumps.insert(pid, std::move(new_pmd)).first;
+ iter = process_dumps.insert(std::make_pair(pid, std::move(new_pmd))).first;
}
- return iter->second;
+ return iter->second.get();
}
} // namespace trace_event

Powered by Google App Engine
This is Rietveld 408576698