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

Side by Side Diff: content/browser/resources/media/peer_connection_update_table.js

Issue 428133005: Fix a time conversion bug on webrtc-internals. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 /** 6 /**
7 * The data of a peer connection update. 7 * The data of a peer connection update.
8 * @param {number} pid The id of the renderer. 8 * @param {number} pid The id of the renderer.
9 * @param {number} lid The id of the peer conneciton inside a renderer. 9 * @param {number} lid The id of the peer conneciton inside a renderer.
10 * @param {string} type The type of the update. 10 * @param {string} type The type of the update.
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 * 74 *
75 * @param {!Element} peerConnectionElement The root element. 75 * @param {!Element} peerConnectionElement The root element.
76 * @param {!PeerConnectionUpdateEntry} update The update to add. 76 * @param {!PeerConnectionUpdateEntry} update The update to add.
77 */ 77 */
78 addPeerConnectionUpdate: function(peerConnectionElement, update) { 78 addPeerConnectionUpdate: function(peerConnectionElement, update) {
79 var tableElement = this.ensureUpdateContainer_(peerConnectionElement); 79 var tableElement = this.ensureUpdateContainer_(peerConnectionElement);
80 80
81 var row = document.createElement('tr'); 81 var row = document.createElement('tr');
82 tableElement.firstChild.appendChild(row); 82 tableElement.firstChild.appendChild(row);
83 83
84 var time = new Date(parseInt(update.time)); 84 var time = new Date(parseFloat(update.time));
85 row.innerHTML = '<td>' + time.toLocaleString() + '</td>'; 85 row.innerHTML = '<td>' + time.toLocaleString() + '</td>';
86 86
87 if (update.value.length == 0) { 87 if (update.value.length == 0) {
88 row.innerHTML += '<td>' + update.type + '</td>'; 88 row.innerHTML += '<td>' + update.type + '</td>';
89 return; 89 return;
90 } 90 }
91 91
92 row.innerHTML += '<td><details><summary>' + update.type + 92 row.innerHTML += '<td><details><summary>' + update.type +
93 '</summary></details></td>'; 93 '</summary></details></td>';
94 94
(...skipping 25 matching lines...) Expand all
120 tableContainer.appendChild(tableElement); 120 tableContainer.appendChild(tableElement);
121 tableElement.innerHTML = '<tr><th>Time</th>' + 121 tableElement.innerHTML = '<tr><th>Time</th>' +
122 '<th class="update-log-header-event">Event</th></tr>'; 122 '<th class="update-log-header-event">Event</th></tr>';
123 } 123 }
124 return tableElement; 124 return tableElement;
125 } 125 }
126 }; 126 };
127 127
128 return PeerConnectionUpdateTable; 128 return PeerConnectionUpdateTable;
129 })(); 129 })();
OLDNEW
« no previous file with comments | « content/browser/media/webrtc_internals.cc ('k') | content/browser/resources/media/stats_table.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698