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

Unified Diff: util/mac/process_reader.cc

Issue 543193002: Make ProcessReaderModule and ProcessReaderThread nested classes (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Address review feedback Created 6 years, 3 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 | « util/mac/process_reader.h ('k') | util/mac/process_reader_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/mac/process_reader.cc
diff --git a/util/mac/process_reader.cc b/util/mac/process_reader.cc
index fbe5ff07e19656dddaa0dc3375188641a1b896ff..e526315997b720f54cbe8072308606df1e3391ec 100644
--- a/util/mac/process_reader.cc
+++ b/util/mac/process_reader.cc
@@ -69,7 +69,7 @@ kern_return_t MachVMRegionRecurseDeepest(mach_port_t task,
namespace crashpad {
-ProcessReaderThread::ProcessReaderThread()
+ProcessReader::Thread::Thread()
: thread_context(),
float_context(),
debug_context(),
@@ -82,10 +82,10 @@ ProcessReaderThread::ProcessReaderThread()
priority(0) {
}
-ProcessReaderModule::ProcessReaderModule() : name(), address(0), timestamp(0) {
+ProcessReader::Module::Module() : name(), address(0), timestamp(0) {
}
-ProcessReaderModule::~ProcessReaderModule() {
+ProcessReader::Module::~Module() {
}
ProcessReader::ProcessReader()
@@ -101,7 +101,7 @@ ProcessReader::ProcessReader()
}
ProcessReader::~ProcessReader() {
- for (const ProcessReaderThread& thread : threads_) {
+ for (const Thread& thread : threads_) {
kern_return_t kr = mach_port_deallocate(mach_task_self(), thread.port);
MACH_LOG_IF(ERROR, kr != KERN_SUCCESS, kr) << "mach_port_deallocate";
}
@@ -186,7 +186,7 @@ bool ProcessReader::CPUTimes(timeval* user_time, timeval* system_time) const {
return true;
}
-const std::vector<ProcessReaderThread>& ProcessReader::Threads() {
+const std::vector<ProcessReader::Thread>& ProcessReader::Threads() {
INITIALIZATION_STATE_DCHECK_VALID(initialized_);
if (!initialized_threads_) {
@@ -196,7 +196,7 @@ const std::vector<ProcessReaderThread>& ProcessReader::Threads() {
return threads_;
}
-const std::vector<ProcessReaderModule>& ProcessReader::Modules() {
+const std::vector<ProcessReader::Module>& ProcessReader::Modules() {
INITIALIZATION_STATE_DCHECK_VALID(initialized_);
if (!initialized_modules_) {
@@ -231,7 +231,7 @@ void ProcessReader::InitializeThreads() {
mach_vm_round_page(thread_count * sizeof(*threads)));
for (size_t index = 0; index < thread_count; ++index) {
- ProcessReaderThread thread;
+ Thread thread;
thread.port = threads[index];
#if defined(ARCH_CPU_X86_FAMILY)
@@ -410,7 +410,7 @@ void ProcessReader::InitializeModules() {
bool found_dyld = false;
for (const process_types::dyld_image_info& image_info : image_info_vector) {
- ProcessReaderModule module;
+ Module module;
module.address = image_info.imageLoadAddress;
module.timestamp = image_info.imageFileModDate;
if (!task_memory_->ReadCString(image_info.imageFilePath, &module.name)) {
@@ -443,7 +443,7 @@ void ProcessReader::InitializeModules() {
// in its LC_LOAD_DYLINKER command.
if (!found_dyld && all_image_infos.version >= 2 &&
all_image_infos.dyldImageLoadAddress) {
- ProcessReaderModule module;
+ Module module;
module.address = all_image_infos.dyldImageLoadAddress;
module.timestamp = 0;
« no previous file with comments | « util/mac/process_reader.h ('k') | util/mac/process_reader_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698