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

Unified Diff: minidump/minidump_crashpad_info_writer.h

Issue 674153002: minidump: Change the ownership model (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Address review feedback Created 6 years, 2 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 | « minidump/minidump_context_writer.h ('k') | minidump/minidump_crashpad_info_writer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: minidump/minidump_crashpad_info_writer.h
diff --git a/minidump/minidump_crashpad_info_writer.h b/minidump/minidump_crashpad_info_writer.h
index d459d82403a5985f6908ec82935bcd371f286f2b..43f6d5512c251f65457b56360b271c109a249f97 100644
--- a/minidump/minidump_crashpad_info_writer.h
+++ b/minidump/minidump_crashpad_info_writer.h
@@ -18,6 +18,7 @@
#include <vector>
#include "base/basictypes.h"
+#include "base/memory/scoped_ptr.h"
#include "minidump/minidump_extensions.h"
#include "minidump/minidump_stream_writer.h"
@@ -29,17 +30,18 @@ class MinidumpModuleCrashpadInfoListWriter;
class MinidumpCrashpadInfoWriter final : public internal::MinidumpStreamWriter {
public:
MinidumpCrashpadInfoWriter();
- ~MinidumpCrashpadInfoWriter();
+ ~MinidumpCrashpadInfoWriter() override;
//! \brief Arranges for MinidumpCrashpadInfo::module_list to point to the
//! MinidumpModuleCrashpadInfoList object to be written by \a
//! module_list.
//!
- //! \a module_list will become a child of this object in the overall tree of
- //! internal::MinidumpWritable objects.
+ //! This object takes ownership of \a module_list and becomes its parent in
+ //! the overall tree of internal::MinidumpWritable objects.
//!
//! \note Valid in #kStateMutable.
- void SetModuleList(MinidumpModuleCrashpadInfoListWriter* module_list);
+ void SetModuleList(
+ scoped_ptr<MinidumpModuleCrashpadInfoListWriter> module_list);
protected:
// MinidumpWritable:
@@ -53,7 +55,7 @@ class MinidumpCrashpadInfoWriter final : public internal::MinidumpStreamWriter {
private:
MinidumpCrashpadInfo crashpad_info_;
- MinidumpModuleCrashpadInfoListWriter* module_list_; // weak
+ scoped_ptr<MinidumpModuleCrashpadInfoListWriter> module_list_;
DISALLOW_COPY_AND_ASSIGN(MinidumpCrashpadInfoWriter);
};
« no previous file with comments | « minidump/minidump_context_writer.h ('k') | minidump/minidump_crashpad_info_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698