| Index: client/crashpad_info.h
|
| diff --git a/client/crashpad_info.h b/client/crashpad_info.h
|
| index 86afff13a61a77b78a4e8abe0ff5a3c42b2458f3..883885cf3f89600de219f9d0832fded4417465e9 100644
|
| --- a/client/crashpad_info.h
|
| +++ b/client/crashpad_info.h
|
| @@ -32,6 +32,18 @@ namespace crashpad {
|
| //! module that contains the client interface code.
|
| struct CrashpadInfo {
|
| public:
|
| + //! \brief Options to enable and disable features.
|
| + enum TriState {
|
| + //! \brief No special behavior is requested, and the defaults are desired.
|
| + kDefault = 0,
|
| +
|
| + //! \brief The behavior should be enabled.
|
| + kEnabled,
|
| +
|
| + //! \brief The behavior should be disabled.
|
| + kDisabled,
|
| + };
|
| +
|
| //! \brief Returns the global CrashpadInfo structure.
|
| static CrashpadInfo* GetCrashpadInfo();
|
|
|
| @@ -41,6 +53,38 @@ struct CrashpadInfo {
|
| simple_annotations_ = simple_annotations;
|
| }
|
|
|
| + //! \brief Enables or disables Crashpad handler processing.
|
| + //!
|
| + //! When handling an exception, the Crashpad handler will scan all modules in
|
| + //! a process. The first one that has a CrashpadInfo structure populated with
|
| + //! a value other than #kDefault for \a state will dictate whether the handler
|
| + //! is functional or not. If all modules with a CrashpadInfo structure specify
|
| + //! #kDefault, the handler will be enabled. If disabled, the Crashpad handler
|
| + //! will still run and receive exceptions, but will not take any action on an
|
| + //! exception on its own behalf, except for the action necessary to determine
|
| + //! that it has been disabled.
|
| + //!
|
| + //! The Crashpad handler should not normally be disabled. More commonly, it
|
| + //! is appropraite to disable crash report upload by calling
|
| + //! Settings::SetUploadsEnabled().
|
| + void SetCrashpadHandlerState(TriState state);
|
| +
|
| + //! \brief Enables or disables Crashpad forwarding of exceptions to the
|
| + //! system’s native crash reporter.
|
| + //!
|
| + //! When handling an exception, the Crashpad handler will scan all modules in
|
| + //! a process. The first one that has a CrashpadInfo structure populated with
|
| + //! a value other than #kDefault for \a state will dictate whether the
|
| + //! exception is forwarded to the system’s native crash reporter. If all
|
| + //! modules with a CrashpadInfo structure specify #kDefault, forwarding will
|
| + //! be enabled. Unless disabled, forwarding may still occur if the Crashpad
|
| + //! handler is disabled by SetCrashpadHandlerState(). Even when forwarding is
|
| + //! enabled, the Crashpad handler may choose not to forward all exceptions to
|
| + //! the system’s native crash reporter in cases where it has reason to believe
|
| + //! that the system’s native crash reporter would not normally have handled
|
| + //! the exception in Crashpad’s absence.
|
| + void SetNativeCrashReporterForwarding(TriState state);
|
| +
|
| static const uint32_t kSignature = 'CPad';
|
|
|
| private:
|
| @@ -57,7 +101,13 @@ struct CrashpadInfo {
|
| uint32_t signature_; // kSignature
|
| uint32_t size_; // The size of the entire CrashpadInfo structure.
|
| uint32_t version_; // kVersion
|
| - uint32_t padding_0_;
|
| +
|
| + // options_ stores the state for SetCrashpadHandlerState() and
|
| + // SetNativeCrashReporterForwarding().
|
| + uint8_t options_;
|
| +
|
| + uint8_t padding_0_;
|
| + uint16_t padding_1_;
|
| SimpleStringDictionary* simple_annotations_; // weak
|
|
|
| #if defined(__clang__)
|
|
|