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 13 matching lines...) Expand all Loading... | |
| 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 title.textContent = | 32 title.textContent = |
| 33 loadTimeData.getStringF('webrtcLogHeaderFormat', | 33 loadTimeData.getStringF('webrtcLogHeaderFormat', |
| 34 upload['capture_time'].length != 0 ? | 34 upload['capture_time'].length != 0 ? |
|
tommi (sloooow) - chröme
2015/10/19 14:08:26
do you still need this check?
Henrik Grunell
2015/10/19 14:31:07
Moved this check to c++ as well.
| |
| 35 upload['capture_time'] : | 35 upload['capture_time'] : |
| 36 upload['upload_time']); | 36 '(unknown time)'); |
| 37 logBlock.appendChild(title); | 37 logBlock.appendChild(title); |
| 38 | 38 |
| 39 var localFileLine = document.createElement('p'); | 39 var localFileLine = document.createElement('p'); |
| 40 if (upload['local_file'].length == 0) { | 40 if (upload['local_file'].length == 0) { |
| 41 localFileLine.textContent = | 41 localFileLine.textContent = |
| 42 loadTimeData.getString('noLocalLogFileMessage'); | 42 loadTimeData.getString('noLocalLogFileMessage'); |
| 43 } else { | 43 } else { |
| 44 localFileLine.textContent = | 44 localFileLine.textContent = |
| 45 loadTimeData.getString('webrtcLogLocalFileLabelFormat') + ' '; | 45 loadTimeData.getString('webrtcLogLocalFileLabelFormat') + ' '; |
| 46 var localFileLink = document.createElement('a'); | 46 var localFileLink = document.createElement('a'); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 96 } | 96 } |
| 97 logBlock.appendChild(uploadLine); | 97 logBlock.appendChild(uploadLine); |
| 98 | 98 |
| 99 logSection.appendChild(logBlock); | 99 logSection.appendChild(logBlock); |
| 100 } | 100 } |
| 101 | 101 |
| 102 $('no-logs').hidden = uploads.length != 0; | 102 $('no-logs').hidden = uploads.length != 0; |
| 103 } | 103 } |
| 104 | 104 |
| 105 document.addEventListener('DOMContentLoaded', requestUploads); | 105 document.addEventListener('DOMContentLoaded', requestUploads); |
| OLD | NEW |