Refactor the Windows MinidumpGenerator interface to get rid of the overloads when generating dumps.

All required params are now passed to the constructor and the various options are set through new methods.

BUG=N/A
TEST=Existing minidump generation tests
R=mark@chromium.org

Review URL: https://breakpad.appspot.com/1074002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1274 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
cdn@chromium.org
2014-01-17 22:39:11 +00:00
parent d9f582edce
commit 8b65346242
5 changed files with 262 additions and 260 deletions

View File

@@ -104,19 +104,19 @@ class MinidumpTest: public testing::Test {
&ctx_record,
};
MinidumpGenerator generator(dump_path_);
MinidumpGenerator generator(dump_path_,
::GetCurrentProcess(),
::GetCurrentProcessId(),
::GetCurrentThreadId(),
::GetCurrentThreadId(),
&ex_ptrs,
NULL,
static_cast<MINIDUMP_TYPE>(flags),
TRUE);
generator.GenerateDumpFile(&dump_file_);
generator.GenerateFullDumpFile(&full_dump_file_);
// And write a dump
bool result = generator.WriteMinidump(::GetCurrentProcess(),
::GetCurrentProcessId(),
::GetCurrentThreadId(),
::GetCurrentThreadId(),
&ex_ptrs,
NULL,
static_cast<MINIDUMP_TYPE>(flags),
TRUE,
&dump_file_,
&full_dump_file_);
bool result = generator.WriteMinidump();
return result == TRUE;
}