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

Unified Diff: snapshot/mac/process_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/process_snapshot_mac.h ('k') | snapshot/mac/process_types/crashpad_info.proctype » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « snapshot/mac/process_snapshot_mac.h ('k') | snapshot/mac/process_types/crashpad_info.proctype » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698