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

Unified Diff: third_party/crashpad/crashpad/minidump/minidump_file_writer.h

Issue 2773813002: Update Crashpad to 8e37886d418dd042c3c7bfadac99214739ee4d98 (Closed)
Patch Set: Update Crashpad to 8e37886d418dd042c3c7bfadac99214739ee4d98 Created 3 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
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:

Powered by Google App Engine
This is Rietveld 408576698