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

Unified Diff: minidump/minidump_file_writer.cc

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_file_writer.h ('k') | minidump/minidump_file_writer_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: minidump/minidump_file_writer.cc
diff --git a/minidump/minidump_file_writer.cc b/minidump/minidump_file_writer.cc
index fb3b4765d4ed8f2268e1436e09ecf809030116f1..a3a169dd4be8034ab8925f929c4da8e222353af4 100644
--- a/minidump/minidump_file_writer.cc
+++ b/minidump/minidump_file_writer.cc
@@ -42,7 +42,8 @@ void MinidumpFileWriter::SetTimestamp(time_t timestamp) {
internal::MinidumpWriterUtil::AssignTimeT(&header_.TimeDateStamp, timestamp);
}
-void MinidumpFileWriter::AddStream(internal::MinidumpStreamWriter* stream) {
+void MinidumpFileWriter::AddStream(
+ scoped_ptr<internal::MinidumpStreamWriter> stream) {
DCHECK_EQ(state(), kStateMutable);
MinidumpStreamType stream_type = stream->StreamType();
@@ -50,7 +51,7 @@ void MinidumpFileWriter::AddStream(internal::MinidumpStreamWriter* stream) {
auto rv = stream_types_.insert(stream_type);
CHECK(rv.second) << "stream_type " << stream_type << " already present";
- streams_.push_back(stream);
+ streams_.push_back(stream.release());
DCHECK_EQ(streams_.size(), stream_types_.size());
}
« no previous file with comments | « minidump/minidump_file_writer.h ('k') | minidump/minidump_file_writer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698