Index: third_party/crashpad/crashpad/minidump/minidump_file_writer.h |
diff --git a/third_party/crashpad/crashpad/minidump/minidump_file_writer.h b/third_party/crashpad/crashpad/minidump/minidump_file_writer.h |
index b093dade3392b83d350282d62281cce49ec1384a..d5e2d1a56ba90417b0ecbc2a07aaade609471330 100644 |
--- a/third_party/crashpad/crashpad/minidump/minidump_file_writer.h |
+++ b/third_party/crashpad/crashpad/minidump/minidump_file_writer.h |
@@ -33,6 +33,7 @@ |
namespace crashpad { |
class ProcessSnapshot; |
+class MinidumpUserExtensionStreamDataSource; |
//! \brief The root-level object in a minidump file. |
//! |
@@ -61,7 +62,11 @@ class MinidumpFileWriter final : public internal::MinidumpWritable { |
//! - kMinidumpStreamTypeThreadList |
//! - kMinidumpStreamTypeException (if present) |
//! - kMinidumpStreamTypeModuleList |
+ //! - kMinidumpStreamTypeUnloadedModuleList (if present) |
//! - kMinidumpStreamTypeCrashpadInfo (if present) |
+ //! - kMinidumpStreamTypeMemoryInfoList (if present) |
+ //! - kMinidumpStreamTypeHandleData (if present) |
+ //! - User streams (if present) |
//! - kMinidumpStreamTypeMemoryList |
//! |
//! \param[in] process_snapshot The process snapshot to use as source data. |
@@ -84,11 +89,40 @@ class MinidumpFileWriter final : public internal::MinidumpWritable { |
//! |
//! At most one object of each stream type (as obtained from |
//! internal::MinidumpStreamWriter::StreamType()) may be added to a |
- //! MinidumpFileWriter object. It is an error to attempt to add multiple |
- //! streams with the same stream type. |
+ //! MinidumpFileWriter object. If an attempt is made to add a stream whose |
+ //! type matches an existing stream’s type, this method discards the new |
+ //! stream. |
//! |
//! \note Valid in #kStateMutable. |
- void AddStream(std::unique_ptr<internal::MinidumpStreamWriter> stream); |
+ //! |
+ //! \return `true` on success. `false` on failure, as occurs when an attempt |
+ //! is made to add a stream whose type matches an existing stream’s type, |
+ //! with a message logged. |
+ bool AddStream(std::unique_ptr<internal::MinidumpStreamWriter> stream); |
+ |
+ //! \brief Adds a user extension stream to the minidump file and arranges for |
+ //! a MINIDUMP_DIRECTORY entry to point to it. |
+ //! |
+ //! This object takes ownership of \a user_extension_stream_data. |
+ //! |
+ //! At most one object of each stream type (as obtained from |
+ //! internal::MinidumpStreamWriter::StreamType()) may be added to a |
+ //! MinidumpFileWriter object. If an attempt is made to add a stream whose |
+ //! type matches an existing stream’s type, this method discards the new |
+ //! stream. |
+ //! |
+ //! \param[in] user_extension_stream_data The stream data to add to the |
+ //! minidump file. Note that the buffer this object points to must be valid |
+ //! through WriteEverything(). |
+ //! |
+ //! \note Valid in #kStateMutable. |
+ //! |
+ //! \return `true` on success. `false` on failure, as occurs when an attempt |
+ //! is made to add a stream whose type matches an existing stream’s type, |
+ //! with a message logged. |
+ bool AddUserExtensionStream( |
+ std::unique_ptr<MinidumpUserExtensionStreamDataSource> |
+ user_extension_stream_data); |
// MinidumpWritable: |