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

Unified Diff: components/crash/core/browser/crashes_ui_util.cc

Issue 2612993003: Display both capture and upload times in chrome://crashes. (Closed)
Patch Set: Handle Breakpad reports (with no capture_time) correctly. Created 3 years, 11 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/resources/crashes.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/crash/core/browser/crashes_ui_util.cc
diff --git a/components/crash/core/browser/crashes_ui_util.cc b/components/crash/core/browser/crashes_ui_util.cc
index c83361c0de9fac0a99d21bc0f72af315a6819a7e..b9651dd46a22b6341a7e9f7fa531abb8f84c7121 100644
--- a/components/crash/core/browser/crashes_ui_util.cc
+++ b/components/crash/core/browser/crashes_ui_util.cc
@@ -22,7 +22,9 @@ const CrashesUILocalizedString kCrashesUILocalizedStrings[] = {
{"crashCountFormat", IDS_CRASH_CRASH_COUNT_BANNER_FORMAT},
{"crashHeaderFormat", IDS_CRASH_CRASH_HEADER_FORMAT},
{"crashHeaderFormatLocalOnly", IDS_CRASH_CRASH_HEADER_FORMAT_LOCAL_ONLY},
- {"crashTimeFormat", IDS_CRASH_CRASH_TIME_FORMAT},
+ {"crashUploadTimeFormat", IDS_CRASH_UPLOAD_TIME_FORMAT},
+ {"crashCaptureAndUploadTimeFormat",
+ IDS_CRASH_CAPTURE_AND_UPLOAD_TIME_FORMAT},
{"crashNotUploaded", IDS_CRASH_CRASH_NOT_UPLOADED},
{"crashUserRequested", IDS_CRASH_CRASH_USER_REQUESTED},
{"crashPending", IDS_CRASH_CRASH_PENDING},
@@ -69,10 +71,11 @@ void UploadListToValue(UploadList* upload_list, base::ListValue* out_value) {
std::unique_ptr<base::DictionaryValue> crash(new base::DictionaryValue());
crash->SetString("id", info.upload_id);
if (info.state == UploadList::UploadInfo::State::Uploaded) {
- crash->SetString("time",
+ crash->SetString("upload_time",
base::TimeFormatFriendlyDateAndTime(info.upload_time));
- } else {
- crash->SetString("time",
+ }
+ if (!info.capture_time.is_null()) {
+ crash->SetString("capture_time",
base::TimeFormatFriendlyDateAndTime(info.capture_time));
}
crash->SetString("local_id", info.local_id);
« no previous file with comments | « no previous file | components/crash/core/browser/resources/crashes.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698