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

Unified Diff: base/trace_event/heap_profiler_heap_dump_writer.cc

Issue 1717283003: tracing: Make ConvertableToTraceFormat move-only scoped_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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
Index: base/trace_event/heap_profiler_heap_dump_writer.cc
diff --git a/base/trace_event/heap_profiler_heap_dump_writer.cc b/base/trace_event/heap_profiler_heap_dump_writer.cc
index 86695cf1cee488677c7b8f8ec5f367f2fd44f610..b94c31246b9d347d42c285d04878c586ed7f9163 100644
--- a/base/trace_event/heap_profiler_heap_dump_writer.cc
+++ b/base/trace_event/heap_profiler_heap_dump_writer.cc
@@ -248,9 +248,9 @@ const std::set<Entry>& HeapDumpWriter::Summarize(
return entries_;
}
-scoped_refptr<TracedValue> Serialize(const std::set<Entry>& entries) {
+scoped_ptr<TracedValue> Serialize(const std::set<Entry>& entries) {
std::string buffer;
- scoped_refptr<TracedValue> traced_value = new TracedValue;
+ scoped_ptr<TracedValue> traced_value(new TracedValue);
traced_value->BeginArray("entries");
@@ -289,7 +289,7 @@ scoped_refptr<TracedValue> Serialize(const std::set<Entry>& entries) {
} // namespace internal
-scoped_refptr<TracedValue> ExportHeapDump(
+scoped_ptr<TracedValue> ExportHeapDump(
const hash_map<AllocationContext, size_t>& bytes_by_size,
StackFrameDeduplicator* stack_frame_deduplicator,
TypeNameDeduplicator* type_name_deduplicator) {

Powered by Google App Engine
This is Rietveld 408576698