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

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

Issue 2581983002: Fix Incorrect date/time info under chrome://crashes. (Closed)
Patch Set: Split crash+upload into two separate strings. Created 4 years 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
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 1a6b4f2b96d0c5d14a7f648b34d67f034e3e5572..25856cc9849fac7faf92f3885dacfdc8e7666d24 100644
--- a/components/crash/core/browser/crashes_ui_util.cc
+++ b/components/crash/core/browser/crashes_ui_util.cc
@@ -23,6 +23,7 @@ const CrashesUILocalizedString kCrashesUILocalizedStrings[] = {
{"crashHeaderFormat", IDS_CRASH_CRASH_HEADER_FORMAT},
{"crashHeaderFormatLocalOnly", IDS_CRASH_CRASH_HEADER_FORMAT_LOCAL_ONLY},
{"crashTimeFormat", IDS_CRASH_CRASH_TIME_FORMAT},
+ {"crashAndUploadTimeFormat", IDS_CRASH_CRASH_AND_UPLOAD_TIME_FORMAT},
{"crashNotUploaded", IDS_CRASH_CRASH_NOT_UPLOADED},
{"crashUserRequested", IDS_CRASH_CRASH_USER_REQUESTED},
{"crashPending", IDS_CRASH_CRASH_PENDING},
@@ -72,8 +73,10 @@ void UploadListToValue(UploadList* upload_list, base::ListValue* out_value) {
crash->SetString("upload_time",
base::TimeFormatFriendlyDateAndTime(info.upload_time));
}
- crash->SetString("time",
- base::TimeFormatFriendlyDateAndTime(info.capture_time));
+ if (!info.capture_time.is_null()) {
+ crash->SetString("time",
+ base::TimeFormatFriendlyDateAndTime(info.capture_time));
+ }
crash->SetString("local_id", info.local_id);
crash->SetString("state", UploadInfoStateAsString(info.state));
crash->SetString("file_size", info.file_size);
« no previous file with comments | « no previous file | components/crash/core/browser/resources/crashes.js » ('j') | components/crash/core/browser/resources/crashes.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698