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

Side by Side Diff: chrome/browser/resources/media/webrtc_logs.js

Issue 1405373002: Fix WebRTC log list errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 2 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
OLDNEW
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
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']);
35 upload['capture_time'] :
36 upload['upload_time']);
37 logBlock.appendChild(title); 35 logBlock.appendChild(title);
38 36
39 var localFileLine = document.createElement('p'); 37 var localFileLine = document.createElement('p');
40 if (upload['local_file'].length == 0) { 38 if (upload['local_file'].length == 0) {
41 localFileLine.textContent = 39 localFileLine.textContent =
42 loadTimeData.getString('noLocalLogFileMessage'); 40 loadTimeData.getString('noLocalLogFileMessage');
43 } else { 41 } else {
44 localFileLine.textContent = 42 localFileLine.textContent =
45 loadTimeData.getString('webrtcLogLocalFileLabelFormat') + ' '; 43 loadTimeData.getString('webrtcLogLocalFileLabelFormat') + ' ';
46 var localFileLink = document.createElement('a'); 44 var localFileLink = document.createElement('a');
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 } 94 }
97 logBlock.appendChild(uploadLine); 95 logBlock.appendChild(uploadLine);
98 96
99 logSection.appendChild(logBlock); 97 logSection.appendChild(logBlock);
100 } 98 }
101 99
102 $('no-logs').hidden = uploads.length != 0; 100 $('no-logs').hidden = uploads.length != 0;
103 } 101 }
104 102
105 document.addEventListener('DOMContentLoaded', requestUploads); 103 document.addEventListener('DOMContentLoaded', requestUploads);
OLDNEW
« no previous file with comments | « chrome/browser/media/webrtc_log_uploader_unittest.cc ('k') | chrome/browser/ui/webui/flash_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698