Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 if (uploaded) { | 60 if (uploaded) { |
| 61 var date = document.createElement('p'); | 61 var date = document.createElement('p'); |
| 62 date.textContent = loadTimeData.getStringF('crashTimeFormat', | 62 if (!crash.time) { |
| 63 crash.time, | 63 date.textContent = loadTimeData.getStringF('crashTimeFormat', |
| 64 crash.upload_time); | 64 crash.upload_time); |
| 65 } else { | |
| 66 date.textContent = loadTimeData.getStringF('crashAndUploadTimeFormat', | |
| 67 crash.time, | |
| 68 crash.upload_time); | |
|
Wez
2016/12/22 03:03:13
My suggestion was actually to have two *separate*
Jia
2016/12/22 04:16:55
Done.
| |
| 69 } | |
| 65 crashBlock.appendChild(date); | 70 crashBlock.appendChild(date); |
| 66 var linkBlock = document.createElement('p'); | 71 var linkBlock = document.createElement('p'); |
| 67 var link = document.createElement('a'); | 72 var link = document.createElement('a'); |
| 68 var commentLines = [ | 73 var commentLines = [ |
| 69 'IMPORTANT: Your crash has already been automatically reported ' + | 74 'IMPORTANT: Your crash has already been automatically reported ' + |
| 70 'to our crash system. Please file this bug only if you can provide ' + | 75 'to our crash system. Please file this bug only if you can provide ' + |
| 71 'more information about it.', | 76 'more information about it.', |
| 72 '', | 77 '', |
| 73 '', | 78 '', |
| 74 'Chrome Version: ' + version, | 79 'Chrome Version: ' + version, |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 154 | 159 |
| 155 // Trigger a refresh in 5 seconds. Clear any previous requests. | 160 // Trigger a refresh in 5 seconds. Clear any previous requests. |
| 156 clearTimeout(refreshCrashListId); | 161 clearTimeout(refreshCrashListId); |
| 157 refreshCrashListId = setTimeout(requestCrashes, 5000); | 162 refreshCrashListId = setTimeout(requestCrashes, 5000); |
| 158 } | 163 } |
| 159 | 164 |
| 160 document.addEventListener('DOMContentLoaded', function() { | 165 document.addEventListener('DOMContentLoaded', function() { |
| 161 $('uploadCrashes').onclick = requestCrashUpload; | 166 $('uploadCrashes').onclick = requestCrashUpload; |
| 162 requestCrashes(); | 167 requestCrashes(); |
| 163 }); | 168 }); |
| OLD | NEW |