Index: components/crash/content/app/crashpad.cc |
diff --git a/components/crash/content/app/crashpad.cc b/components/crash/content/app/crashpad.cc |
index 6a8e3ac88278900f71cf54b46ab916c2107adb1d..41af7f974f5ba69f74d06fdd1c55a1a7d952d63e 100644 |
--- a/components/crash/content/app/crashpad.cc |
+++ b/components/crash/content/app/crashpad.cc |
@@ -278,7 +278,10 @@ void GetReports(std::vector<Report>* reports) { |
report.local_id = pending_report.uuid.ToString(); |
report.capture_time = pending_report.creation_time; |
report.upload_time = 0; |
- report.state = ReportUploadState::Pending; |
+ if (pending_report.upload_explicitly_requested) |
+ report.state = ReportUploadState::UserRequested; |
+ else |
+ report.state = ReportUploadState::Pending; |
reports->push_back(report); |
} |
@@ -288,6 +291,15 @@ void GetReports(std::vector<Report>* reports) { |
}); |
} |
+void RequestSingleCrashUpload(const std::string& local_id) { |
+ if (!g_database) |
+ return; |
+ crashpad::UUID uuid; |
+ uuid.InitializeFromString(local_id); |
+ crashpad::CrashReportDatabase::OperationStatus status = |
+ g_database->RequestUpload(uuid); |
+} |
+ |
} // namespace crash_reporter |
#if defined(OS_WIN) |
@@ -318,6 +330,14 @@ void __declspec(dllexport) __cdecl ClearCrashKeyValueImpl(const wchar_t* key) { |
crash_reporter::ClearCrashKey(base::UTF16ToUTF8(key)); |
} |
+// 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, |
jwd
2016/08/23 19:14:30
I think this note about the vector and returned po
gayane -on leave until 09-2017
2016/08/23 20:57:45
Opps. copy paste.
|
+// because we do not want to allocate/free in different modules. The returned |
+// pointer is read-only. |
+void __declspec(dllexport) void RequestSingleCrashUploadImpl( |
+ const std::string& local_id) { |
+ crash_reporter::RequestSingleCrashUpload(local_id); |
+} |
} // extern "C" |
#endif // OS_WIN |