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

Side by Side Diff: base/trace_event/process_memory_dump.cc

Issue 1800743003: base: Remove some unnecessary const scoped_refptr<>&. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/trace_event/process_memory_dump.h" 5 #include "base/trace_event/process_memory_dump.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/process/process_metrics.h" 10 #include "base/process/process_metrics.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 DCHECK(!failure); 114 DCHECK(!failure);
115 if (failure) { 115 if (failure) {
116 total_resident_size = 0; 116 total_resident_size = 0;
117 LOG(ERROR) << "CountResidentBytes failed. The resident size is invalid"; 117 LOG(ERROR) << "CountResidentBytes failed. The resident size is invalid";
118 } 118 }
119 return total_resident_size; 119 return total_resident_size;
120 } 120 }
121 #endif // defined(COUNT_RESIDENT_BYTES_SUPPORTED) 121 #endif // defined(COUNT_RESIDENT_BYTES_SUPPORTED)
122 122
123 ProcessMemoryDump::ProcessMemoryDump( 123 ProcessMemoryDump::ProcessMemoryDump(
124 const scoped_refptr<MemoryDumpSessionState>& session_state) 124 scoped_refptr<MemoryDumpSessionState> session_state)
125 : has_process_totals_(false), 125 : has_process_totals_(false),
126 has_process_mmaps_(false), 126 has_process_mmaps_(false),
127 session_state_(session_state) {} 127 session_state_(std::move(session_state)) {}
128 128
129 ProcessMemoryDump::~ProcessMemoryDump() {} 129 ProcessMemoryDump::~ProcessMemoryDump() {}
130 130
131 MemoryAllocatorDump* ProcessMemoryDump::CreateAllocatorDump( 131 MemoryAllocatorDump* ProcessMemoryDump::CreateAllocatorDump(
132 const std::string& absolute_name) { 132 const std::string& absolute_name) {
133 return AddAllocatorDumpInternal( 133 return AddAllocatorDumpInternal(
134 make_scoped_ptr(new MemoryAllocatorDump(absolute_name, this))); 134 make_scoped_ptr(new MemoryAllocatorDump(absolute_name, this)));
135 } 135 }
136 136
137 MemoryAllocatorDump* ProcessMemoryDump::CreateAllocatorDump( 137 MemoryAllocatorDump* ProcessMemoryDump::CreateAllocatorDump(
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 288
289 void ProcessMemoryDump::AddSuballocation(const MemoryAllocatorDumpGuid& source, 289 void ProcessMemoryDump::AddSuballocation(const MemoryAllocatorDumpGuid& source,
290 const std::string& target_node_name) { 290 const std::string& target_node_name) {
291 std::string child_mad_name = target_node_name + "/__" + source.ToString(); 291 std::string child_mad_name = target_node_name + "/__" + source.ToString();
292 MemoryAllocatorDump* target_child_mad = CreateAllocatorDump(child_mad_name); 292 MemoryAllocatorDump* target_child_mad = CreateAllocatorDump(child_mad_name);
293 AddOwnershipEdge(source, target_child_mad->guid()); 293 AddOwnershipEdge(source, target_child_mad->guid());
294 } 294 }
295 295
296 } // namespace trace_event 296 } // namespace trace_event
297 } // namespace base 297 } // namespace base
OLDNEW
« base/trace_event/memory_dump_manager_unittest.cc ('K') | « base/trace_event/process_memory_dump.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698