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

Side by Side Diff: components/crash/core/browser/resources/crashes.js

Issue 2581983002: Fix Incorrect date/time info under chrome://crashes. (Closed)
Patch Set: Split crash+upload into two separate strings. Created 3 years, 12 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 unified diff | Download patch
« no previous file with comments | « components/crash/core/browser/crashes_ui_util.cc ('k') | components/crash_strings.grdp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /* Id for tracking automatic refresh of crash list. */ 5 /* Id for tracking automatic refresh of crash list. */
6 var refreshCrashListId = undefined; 6 var refreshCrashListId = undefined;
7 7
8 /** 8 /**
9 * Requests the list of crashes from the backend. 9 * Requests the list of crashes from the backend.
10 */ 10 */
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 var uploaded = crash.state == 'uploaded'; 50 var uploaded = crash.state == 'uploaded';
51 if (uploaded) { 51 if (uploaded) {
52 title.textContent = loadTimeData.getStringF('crashHeaderFormat', 52 title.textContent = loadTimeData.getStringF('crashHeaderFormat',
53 crash.id, 53 crash.id,
54 crash.local_id); 54 crash.local_id);
55 } else { 55 } else {
56 title.textContent = loadTimeData.getStringF('crashHeaderFormatLocalOnly', 56 title.textContent = loadTimeData.getStringF('crashHeaderFormatLocalOnly',
57 crash.local_id); 57 crash.local_id);
58 } 58 }
59 crashBlock.appendChild(title); 59 crashBlock.appendChild(title);
60 var date = document.createElement('p');
61 date.textContent = ""
62 if (crash.time) {
63 date.textContent += loadTimeData.getStringF('crashTimeFormat',
64 crash.time);
65 }
66 if (crash.upload_time) {
67 date.textContent += loadTimeData.getStringF('crashUploadTimeFormat',
Wez 2016/12/27 21:47:12 Note that the format strings don't include any pun
68 crash.upload_time);
69 }
70 crashBlock.appendChild(date);
71
60 if (uploaded) { 72 if (uploaded) {
61 var date = document.createElement('p');
62 date.textContent = loadTimeData.getStringF('crashTimeFormat',
63 crash.time,
64 crash.upload_time);
65 crashBlock.appendChild(date);
66 var linkBlock = document.createElement('p'); 73 var linkBlock = document.createElement('p');
67 var link = document.createElement('a'); 74 var link = document.createElement('a');
68 var commentLines = [ 75 var commentLines = [
69 'IMPORTANT: Your crash has already been automatically reported ' + 76 'IMPORTANT: Your crash has already been automatically reported ' +
70 'to our crash system. Please file this bug only if you can provide ' + 77 'to our crash system. Please file this bug only if you can provide ' +
71 'more information about it.', 78 'more information about it.',
72 '', 79 '',
73 '', 80 '',
74 'Chrome Version: ' + version, 81 'Chrome Version: ' + version,
75 'Operating System: ' + os, 82 'Operating System: ' + os,
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 161
155 // Trigger a refresh in 5 seconds. Clear any previous requests. 162 // Trigger a refresh in 5 seconds. Clear any previous requests.
156 clearTimeout(refreshCrashListId); 163 clearTimeout(refreshCrashListId);
157 refreshCrashListId = setTimeout(requestCrashes, 5000); 164 refreshCrashListId = setTimeout(requestCrashes, 5000);
158 } 165 }
159 166
160 document.addEventListener('DOMContentLoaded', function() { 167 document.addEventListener('DOMContentLoaded', function() {
161 $('uploadCrashes').onclick = requestCrashUpload; 168 $('uploadCrashes').onclick = requestCrashUpload;
162 requestCrashes(); 169 requestCrashes();
163 }); 170 });
OLDNEW
« no previous file with comments | « components/crash/core/browser/crashes_ui_util.cc ('k') | components/crash_strings.grdp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698