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

Unified Diff: snapshot/mac/module_snapshot_mac.cc

Issue 997713002: Allow exception forwarding to the system’s native crash reporter to be disabled (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Remove unused function declaration Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « snapshot/mac/module_snapshot_mac.h ('k') | snapshot/mac/process_snapshot_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: snapshot/mac/module_snapshot_mac.cc
diff --git a/snapshot/mac/module_snapshot_mac.cc b/snapshot/mac/module_snapshot_mac.cc
index ddbb6a00b9cb88fca15f6048b88f0b03d5317d43..cc7e1863edd5e4289708264a60f7e9a1442fa76b 100644
--- a/snapshot/mac/module_snapshot_mac.cc
+++ b/snapshot/mac/module_snapshot_mac.cc
@@ -20,6 +20,7 @@
#include "base/strings/stringprintf.h"
#include "snapshot/mac/mach_o_image_annotations_reader.h"
#include "snapshot/mac/mach_o_image_reader.h"
+#include "util/misc/tri_state.h"
#include "util/misc/uuid.h"
#include "util/stdlib/strnlen.h"
@@ -55,6 +56,25 @@ bool ModuleSnapshotMac::Initialize(
return true;
}
+void ModuleSnapshotMac::GetCrashpadOptions(CrashpadInfoClientOptions* options) {
+ INITIALIZATION_STATE_DCHECK_VALID(initialized_);
+
+ process_types::CrashpadInfo crashpad_info;
+ if (!mach_o_image_reader_->GetCrashpadInfo(&crashpad_info)) {
+ options->crashpad_handler_behavior = TriState::kUnset;
+ options->system_crash_reporter_forwarding = TriState::kUnset;
+ return;
+ }
+
+ options->crashpad_handler_behavior =
+ CrashpadInfoClientOptions::TriStateFromCrashpadInfo(
+ crashpad_info.crashpad_handler_behavior);
+
+ options->system_crash_reporter_forwarding =
+ CrashpadInfoClientOptions::TriStateFromCrashpadInfo(
+ crashpad_info.system_crash_reporter_forwarding);
+}
+
std::string ModuleSnapshotMac::Name() const {
INITIALIZATION_STATE_DCHECK_VALID(initialized_);
return name_;
« no previous file with comments | « snapshot/mac/module_snapshot_mac.h ('k') | snapshot/mac/process_snapshot_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698