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

Unified Diff: minidump/minidump_crashpad_info_writer_test.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_crashpad_info_writer.cc ('k') | minidump/minidump_exception_writer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: minidump/minidump_crashpad_info_writer_test.cc
diff --git a/minidump/minidump_crashpad_info_writer_test.cc b/minidump/minidump_crashpad_info_writer_test.cc
index bbc9ce3ea145bf21480ac4beb502063f5bfcc977..3fcb2e06507f5f21a74ed10bcca45550df9bf472 100644
--- a/minidump/minidump_crashpad_info_writer_test.cc
+++ b/minidump/minidump_crashpad_info_writer_test.cc
@@ -50,9 +50,9 @@ void GetCrashpadInfoStream(const std::string& file_contents,
TEST(MinidumpCrashpadInfoWriter, Empty) {
MinidumpFileWriter minidump_file_writer;
- MinidumpCrashpadInfoWriter crashpad_info_writer;
+ auto crashpad_info_writer = make_scoped_ptr(new MinidumpCrashpadInfoWriter());
- minidump_file_writer.AddStream(&crashpad_info_writer);
+ minidump_file_writer.AddStream(crashpad_info_writer.Pass());
StringFileWriter file_writer;
ASSERT_TRUE(minidump_file_writer.WriteEverything(&file_writer));
@@ -71,15 +71,16 @@ TEST(MinidumpCrashpadInfoWriter, CrashpadModuleList) {
const uint32_t kMinidumpModuleListIndex = 3;
MinidumpFileWriter minidump_file_writer;
- MinidumpCrashpadInfoWriter crashpad_info_writer;
+ auto crashpad_info_writer = make_scoped_ptr(new MinidumpCrashpadInfoWriter());
- minidump_file_writer.AddStream(&crashpad_info_writer);
+ auto module_list_writer =
+ make_scoped_ptr(new MinidumpModuleCrashpadInfoListWriter());
+ auto module_writer = make_scoped_ptr(new MinidumpModuleCrashpadInfoWriter());
+ module_writer->SetMinidumpModuleListIndex(kMinidumpModuleListIndex);
+ module_list_writer->AddModule(module_writer.Pass());
+ crashpad_info_writer->SetModuleList(module_list_writer.Pass());
- MinidumpModuleCrashpadInfoListWriter module_list_writer;
- MinidumpModuleCrashpadInfoWriter module_writer;
- module_writer.SetMinidumpModuleListIndex(kMinidumpModuleListIndex);
- module_list_writer.AddModule(&module_writer);
- crashpad_info_writer.SetModuleList(&module_list_writer);
+ minidump_file_writer.AddStream(crashpad_info_writer.Pass());
StringFileWriter file_writer;
ASSERT_TRUE(minidump_file_writer.WriteEverything(&file_writer));
« no previous file with comments | « minidump/minidump_crashpad_info_writer.cc ('k') | minidump/minidump_exception_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698