Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1008)

Unified Diff: chrome/browser/crash_upload_list/crash_upload_list_android.cc

Issue 2330573002: Show crash report size in crashes UI for Android. (Closed)
Patch Set: Add a copy constructor Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/crash/core/browser/crashes_ui_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/crash_upload_list/crash_upload_list_android.cc
diff --git a/chrome/browser/crash_upload_list/crash_upload_list_android.cc b/chrome/browser/crash_upload_list/crash_upload_list_android.cc
index f360b22878ef6a26c008e3d3582fce33f38e58f4..b23eb98d550b1c4c23b83ecd91bffdec31a172c6 100644
--- a/chrome/browser/crash_upload_list/crash_upload_list_android.cc
+++ b/chrome/browser/crash_upload_list/crash_upload_list_android.cc
@@ -8,6 +8,7 @@
#include "base/files/file_enumerator.h"
#include "base/files/file_util.h"
#include "base/threading/sequenced_worker_pool.h"
+#include "ui/base/text/bytes_formatting.h"
CrashUploadListAndroid::CrashUploadListAndroid(
Delegate* delegate,
@@ -41,6 +42,10 @@ void CrashUploadListAndroid::LoadUnsuccessfulUploadList(
if (!base::GetFileInfo(file, &info))
continue;
+ int64_t file_size = 0;
+ if (!base::GetFileSize(file, &file_size))
+ continue;
+
// Crash reports can have multiple extensions (e.g. foo.dmp, foo.dmp.try1,
// foo.skipped.try0).
file = file.BaseName();
@@ -55,9 +60,9 @@ void CrashUploadListAndroid::LoadUnsuccessfulUploadList(
continue;
id = id.substr(pos + 1);
- UploadList::UploadInfo upload(std::string(), base::Time(), id,
- info.creation_time,
- UploadList::UploadInfo::State::NotUploaded);
+ UploadList::UploadInfo upload(id, info.creation_time,
+ UploadList::UploadInfo::State::NotUploaded,
+ ui::FormatBytes(file_size));
uploads->push_back(upload);
}
}
« no previous file with comments | « no previous file | components/crash/core/browser/crashes_ui_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698