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

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: Fall back on local ID as time, then upload time. 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'].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
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);
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