Index: chrome/browser/crash_upload_list/crash_upload_list_crashpad.cc |
diff --git a/chrome/browser/crash_upload_list/crash_upload_list_crashpad.cc b/chrome/browser/crash_upload_list/crash_upload_list_crashpad.cc |
index d62973e34209172aa68e34df6a592eef45623a25..ac4668db40c2c82a0dd6e3631819ee7713700aa6 100644 |
--- a/chrome/browser/crash_upload_list/crash_upload_list_crashpad.cc |
+++ b/chrome/browser/crash_upload_list/crash_upload_list_crashpad.cc |
@@ -38,6 +38,21 @@ void GetReportsThunk( |
reports_pointer, reports_pointer + report_count); |
} |
} |
+ |
+void RequestSingleCrashUploadThunk(const std::string& local_id) { |
+ // The crash reporting is handled by chrome_elf.dll which loads early in |
+ // the chrome process. |
+ HMODULE elf_module = GetModuleHandle(chrome::kChromeElfDllName); |
+ if (elf_module) { |
+ static RequestSingleCrashUploadPointer request_single_crash_upload = |
+ reinterpret_cast<RequestSingleCrashUploadPointer>( |
+ GetProcAddress(elf_module, "RequestSingleCrashUploadImpl")); |
jwd
2016/08/23 19:14:30
Can you pull the string out into a constant in the
gayane -on leave until 09-2017
2016/08/23 20:57:45
Done.
|
+ |
+ if (request_single_crash_upload) |
+ request_single_crash_upload(local_id); |
+ } |
+} |
+ |
#endif // OS_WIN |
UploadList::UploadInfo::State ReportUploadStateToUploadInfoState( |
@@ -51,6 +66,9 @@ UploadList::UploadInfo::State ReportUploadStateToUploadInfoState( |
case crash_reporter::ReportUploadState::Uploaded: |
return UploadList::UploadInfo::State::Uploaded; |
+ |
+ case crash_reporter::ReportUploadState::UserRequested: |
+ return UploadList::UploadInfo::State::UserRequested; |
} |
NOTREACHED(); |
@@ -86,3 +104,16 @@ void CrashUploadListCrashpad::LoadUploadList( |
ReportUploadStateToUploadInfoState(report.state))); |
} |
} |
+ |
+void CrashUploadListCrashpad::RequestSingleCrashUpload( |
+ const std::string& local_id) { |
+#if defined(OS_WIN) |
+ // On Windows, we only link crash client into chrome.exe (not the dlls), and |
+ // it does the registration. That means the global that holds the crash report |
+ // database lives in the .exe, so we need to grab a pointer to a helper in the |
+ // exe. |
jwd
2016/08/23 19:14:30
I don't think this is a good way of explaining it.
gayane -on leave until 09-2017
2016/08/23 20:57:45
Done.
|
+ RequestSingleCrashUploadThunk(local_id); |
+#else |
+ crash_reporter::RequestSingleCrashUpload(local_id); |
+#endif |
+} |