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

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

Issue 2543493003: webrtc-internals: add useragent to JSON dump (Closed)
Patch Set: s/User-Agent/UserAgent/ Created 4 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 * Provides the UI for dump creation. 7 * Provides the UI for dump creation.
8 */ 8 */
9 var DumpCreator = (function() { 9 var DumpCreator = (function() {
10 /** 10 /**
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 /** 111 /**
112 * Downloads the PeerConnection updates and stats data as a file. 112 * Downloads the PeerConnection updates and stats data as a file.
113 * 113 *
114 * @private 114 * @private
115 */ 115 */
116 onDownloadData_: function() { 116 onDownloadData_: function() {
117 var dump_object = 117 var dump_object =
118 { 118 {
119 'getUserMedia': userMediaRequests, 119 'getUserMedia': userMediaRequests,
120 'PeerConnections': peerConnectionDataStore, 120 'PeerConnections': peerConnectionDataStore,
121 'UserAgent': navigator.userAgent,
121 }; 122 };
122 var textBlob = new Blob([JSON.stringify(dump_object, null, ' ')], 123 var textBlob = new Blob([JSON.stringify(dump_object, null, ' ')],
123 {type: 'octet/stream'}); 124 {type: 'octet/stream'});
124 var URL = window.URL.createObjectURL(textBlob); 125 var URL = window.URL.createObjectURL(textBlob);
125 126
126 var anchor = this.root_.getElementsByTagName('a')[0]; 127 var anchor = this.root_.getElementsByTagName('a')[0];
127 anchor.href = URL; 128 anchor.href = URL;
128 anchor.download = 'webrtc_internals_dump.txt'; 129 anchor.download = 'webrtc_internals_dump.txt';
129 // The default action of the anchor will download the URL. 130 // The default action of the anchor will download the URL.
130 }, 131 },
(...skipping 21 matching lines...) Expand all
152 var enabled = this.root_.getElementsByTagName('input')[1].checked; 153 var enabled = this.root_.getElementsByTagName('input')[1].checked;
153 if (enabled) { 154 if (enabled) {
154 chrome.send('enableEventLogRecordings'); 155 chrome.send('enableEventLogRecordings');
155 } else { 156 } else {
156 chrome.send('disableEventLogRecordings'); 157 chrome.send('disableEventLogRecordings');
157 } 158 }
158 }, 159 },
159 }; 160 };
160 return DumpCreator; 161 return DumpCreator;
161 })(); 162 })();
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698