Chromium Code Reviews| 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..2c6049235e51b96cc3884aa59765bba7f017e268 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) |
|
Mark Mentovai
2016/08/25 20:25:11
Seems like a good case for the ?: operator.
gayane -on leave until 09-2017
2016/08/26 00:12:55
Done.
|
| + report.state = ReportUploadState::UserRequested; |
| + else |
| + report.state = ReportUploadState::Pending; |
| reports->push_back(report); |
| } |
| @@ -288,6 +291,14 @@ void GetReports(std::vector<Report>* reports) { |
| }); |
| } |
| +void RequestSingleCrashUpload(const std::string& local_id) { |
| + if (!g_database) |
| + return; |
| + crashpad::UUID uuid; |
| + uuid.InitializeFromString(local_id); |
| + g_database->RequestUpload(uuid); |
| +} |
| + |
| } // namespace crash_reporter |
| #if defined(OS_WIN) |
| @@ -318,6 +329,12 @@ 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 request a single crash report |
| +// upload. See CrashUploadListCrashpad. |
| +void __declspec(dllexport) void RequestSingleCrashUploadImpl( |
| + const std::string& local_id) { |
| + crash_reporter::RequestSingleCrashUpload(local_id); |
| +} |
| } // extern "C" |
| #endif // OS_WIN |