Commit 11a1bcc1 authored by Joshua Peraza's avatar Joshua Peraza Committed by Commit Bot

android: list pending uploads before done uploads

The upload list is capped at 50 crashes. Previously, the already
completed uploads were listed before the pending uploads. This
patch places the pending uploads first so that it is possible for the
user to see them and manually* trigger an upload.

*The "send now" button does not actually send the report now. It
schedules the dump for upload at a later time of the Job Scheduler's
choosing.

Bug: 1023836
Change-Id: Ided52abc451f4ac167dc9eb0db93d4ea32bdc090
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1917689Reviewed-by: default avatarMark Mentovai <mark@chromium.org>
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
Cr-Commit-Position: refs/heads/master@{#715385}
parent 7030d91a
...@@ -58,10 +58,14 @@ bool CrashUploadListAndroid::DidBrowserCrashRecently() { ...@@ -58,10 +58,14 @@ bool CrashUploadListAndroid::DidBrowserCrashRecently() {
} }
std::vector<UploadList::UploadInfo> CrashUploadListAndroid::LoadUploadList() { std::vector<UploadList::UploadInfo> CrashUploadListAndroid::LoadUploadList() {
// First load the list of successfully uploaded logs. std::vector<UploadInfo> uploads;
std::vector<UploadInfo> uploads = TextLogUploadList::LoadUploadList();
// Then load the unsuccessful uploads.
LoadUnsuccessfulUploadList(&uploads); LoadUnsuccessfulUploadList(&uploads);
std::vector<UploadInfo> complete_uploads =
TextLogUploadList::LoadUploadList();
for (auto info : complete_uploads) {
uploads.push_back(info);
}
return uploads; return uploads;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment