| Index: chrome_elf/chrome_elf_main.cc
|
| diff --git a/chrome_elf/chrome_elf_main.cc b/chrome_elf/chrome_elf_main.cc
|
| index 8ee176f9501cd57ef513e71ae17a32c8fa2ad66d..b79b5731868666e601272383f846f0c17354b637 100644
|
| --- a/chrome_elf/chrome_elf_main.cc
|
| +++ b/chrome_elf/chrome_elf_main.cc
|
| @@ -6,19 +6,40 @@
|
|
|
| #include <windows.h>
|
|
|
| +#include "base/lazy_instance.h"
|
| +#include "chrome/app/chrome_crash_reporter_client_win.h"
|
| #include "chrome/install_static/install_util.h"
|
| #include "chrome_elf/blacklist/blacklist.h"
|
| -#include "chrome_elf/breakpad.h"
|
| +#include "chrome_elf/blacklist/crashpad_helper.h"
|
| +#include "components/crash/content/app/crashpad.h"
|
|
|
| +namespace {
|
| +
|
| +base::LazyInstance<std::vector<crash_reporter::Report>>::Leaky
|
| + g_crash_reports = LAZY_INSTANCE_INITIALIZER;
|
| +
|
| +} // namespace
|
|
|
| void SignalChromeElf() {
|
| blacklist::ResetBeacon();
|
| }
|
|
|
| +// This helper is invoked by code in chrome.dll to retrieve the crash reports.
|
| +// See CrashUploadListCrashpad. Note that we do not pass an std::vector here,
|
| +// because we do not want to allocate/free in different modules. The returned
|
| +// pointer is read-only.
|
| +extern "C" __declspec(dllexport) void GetCrashReportsImpl(
|
| + const crash_reporter::Report** reports,
|
| + size_t* report_count) {
|
| + crash_reporter::GetReports(g_crash_reports.Pointer());
|
| + *reports = g_crash_reports.Pointer()->data();
|
| + *report_count = g_crash_reports.Pointer()->size();
|
| +}
|
| +
|
| BOOL APIENTRY DllMain(HMODULE module, DWORD reason, LPVOID reserved) {
|
| if (reason == DLL_PROCESS_ATTACH) {
|
| + ChromeCrashReporterClient::InitializeCrashReportingForProcess();
|
| install_static::InitializeProcessType();
|
| - InitializeCrashReporting();
|
|
|
| __try {
|
| blacklist::Initialize(false); // Don't force, abort if beacon is present.
|
|
|