Index: snapshot/mac/process_snapshot_mac.cc |
diff --git a/snapshot/mac/process_snapshot_mac.cc b/snapshot/mac/process_snapshot_mac.cc |
index bb11526706551b0fc7b41a670b5cd04899bd2cb2..91ade096601d5c88dfc5616b539dc3e19b8b11c8 100644 |
--- a/snapshot/mac/process_snapshot_mac.cc |
+++ b/snapshot/mac/process_snapshot_mac.cc |
@@ -14,6 +14,8 @@ |
#include "snapshot/mac/process_snapshot_mac.h" |
+#include "util/misc/tri_state.h" |
+ |
namespace crashpad { |
ProcessSnapshotMac::ProcessSnapshotMac() |
@@ -79,6 +81,36 @@ bool ProcessSnapshotMac::InitializeException( |
return true; |
} |
+void ProcessSnapshotMac::GetCrashpadOptions( |
+ CrashpadInfoClientOptions* options) { |
+ INITIALIZATION_STATE_DCHECK_VALID(initialized_); |
+ |
+ CrashpadInfoClientOptions local_options; |
+ |
+ for (internal::ModuleSnapshotMac* module : modules_) { |
+ CrashpadInfoClientOptions module_options; |
+ module->GetCrashpadOptions(&module_options); |
+ |
+ if (local_options.crashpad_handler_behavior == TriState::kUnset) { |
+ local_options.crashpad_handler_behavior = |
+ module_options.crashpad_handler_behavior; |
+ } |
+ if (local_options.system_crash_reporter_forwarding == TriState::kUnset) { |
+ local_options.system_crash_reporter_forwarding = |
+ module_options.system_crash_reporter_forwarding; |
+ } |
+ |
+ // If non-default values have been found for all options, the loop can end |
+ // early. |
+ if (local_options.crashpad_handler_behavior != TriState::kUnset && |
+ local_options.system_crash_reporter_forwarding != TriState::kUnset) { |
+ break; |
+ } |
+ } |
+ |
+ *options = local_options; |
+} |
+ |
pid_t ProcessSnapshotMac::ProcessID() const { |
INITIALIZATION_STATE_DCHECK_VALID(initialized_); |
return process_reader_.ProcessID(); |