Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 /** | 5 /** |
| 6 * Requests the list of uploads from the backend. | 6 * Requests the list of uploads from the backend. |
| 7 */ | 7 */ |
| 8 function requestUploads() { | 8 function requestUploads() { |
| 9 chrome.send('requestWebRtcLogsList'); | 9 chrome.send('requestWebRtcLogsList'); |
| 10 } | 10 } |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 22 | 22 |
| 23 // Clear any previous list. | 23 // Clear any previous list. |
| 24 logSection.textContent = ''; | 24 logSection.textContent = ''; |
| 25 | 25 |
| 26 for (var i = 0; i < uploads.length; i++) { | 26 for (var i = 0; i < uploads.length; i++) { |
| 27 var upload = uploads[i]; | 27 var upload = uploads[i]; |
| 28 | 28 |
| 29 var logBlock = document.createElement('div'); | 29 var logBlock = document.createElement('div'); |
| 30 | 30 |
| 31 var title = document.createElement('h3'); | 31 var title = document.createElement('h3'); |
| 32 // TODO(grunell): Use |capture_time| only. If empty, show "Unknown" or such. | |
| 33 // In october 2015, capture time was added to the log list, previously the | |
| 34 // local ID was used as capture time. It still needs to be backwards | |
| 35 // compatible for some time before changing here. | |
|
tommi (sloooow) - chröme
2015/10/16 18:24:48
Should the log include version information?
Henrik Grunell
2015/10/19 10:53:24
I assume you mean the log list, and update an old
tommi (sloooow) - chröme
2015/10/19 11:11:09
What I was getting at is that if we could say "ver
Henrik Grunell
2015/10/19 12:43:46
We'd have to convert the list info the new version
tommi (sloooow) - chröme
2015/10/19 12:51:42
What about changing capture_time in the C++ code t
Henrik Grunell
2015/10/19 12:58:32
I've already done that. :) Forgot to mention it la
| |
| 32 title.textContent = | 36 title.textContent = |
| 33 loadTimeData.getStringF('webrtcLogHeaderFormat', | 37 loadTimeData.getStringF('webrtcLogHeaderFormat', |
| 34 upload['capture_time'].length != 0 ? | 38 upload['capture_time'].length != 0 ? |
| 35 upload['capture_time'] : | 39 upload['capture_time'] : |
| 36 upload['upload_time']); | 40 upload['upload_time']); |
| 37 logBlock.appendChild(title); | 41 logBlock.appendChild(title); |
| 38 | 42 |
| 39 var localFileLine = document.createElement('p'); | 43 var localFileLine = document.createElement('p'); |
| 40 if (upload['local_file'].length == 0) { | 44 if (upload['local_file'].length == 0) { |
| 41 localFileLine.textContent = | 45 localFileLine.textContent = |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 96 } | 100 } |
| 97 logBlock.appendChild(uploadLine); | 101 logBlock.appendChild(uploadLine); |
| 98 | 102 |
| 99 logSection.appendChild(logBlock); | 103 logSection.appendChild(logBlock); |
| 100 } | 104 } |
| 101 | 105 |
| 102 $('no-logs').hidden = uploads.length != 0; | 106 $('no-logs').hidden = uploads.length != 0; |
| 103 } | 107 } |
| 104 | 108 |
| 105 document.addEventListener('DOMContentLoaded', requestUploads); | 109 document.addEventListener('DOMContentLoaded', requestUploads); |
| OLD | NEW |