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

Side by Side Diff: tracing/tracing/ui/extras/about_tracing/record_controller.html

Issue 2776653002: [ESLint] Fix violations when enabling curly rule in eslint. (Closed)
Patch Set: Fix test Created 3 years, 9 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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <!-- 2 <!--
3 Copyright (c) 2013 The Chromium Authors. All rights reserved. 3 Copyright (c) 2013 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be 4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file. 5 found in the LICENSE file.
6 --> 6 -->
7 7
8 <link rel="import" href="/tracing/ui/extras/about_tracing/record_selection_dialo g.html"> 8 <link rel="import" href="/tracing/ui/extras/about_tracing/record_selection_dialo g.html">
9 9
10 <script> 10 <script>
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 finalPromiseResolver.resolve(tracedData); 127 finalPromiseResolver.resolve(tracedData);
128 } 128 }
129 129
130 function recordFailed(err) { 130 function recordFailed(err) {
131 progressDlg.visible = false; 131 progressDlg.visible = false;
132 finalPromise.progressDlg = undefined; 132 finalPromise.progressDlg = undefined;
133 finalPromiseResolver.reject(err); 133 finalPromiseResolver.reject(err);
134 } 134 }
135 135
136 function getBufferPercentFull() { 136 function getBufferPercentFull() {
137 if (!bufferPercentFullDiv) 137 if (!bufferPercentFullDiv) return;
138 return;
139 138
140 tracingControllerClient.beginGetBufferPercentFull().then( 139 tracingControllerClient.beginGetBufferPercentFull().then(
141 updateBufferPercentFull); 140 updateBufferPercentFull);
142 } 141 }
143 142
144 function updateBufferPercentFull(percentFull) { 143 function updateBufferPercentFull(percentFull) {
145 if (!bufferPercentFullDiv) 144 if (!bufferPercentFullDiv) return;
146 return;
147 145
148 percentFull = Math.round(100 * parseFloat(percentFull)); 146 percentFull = Math.round(100 * parseFloat(percentFull));
149 var newText = 'Buffer usage: ' + percentFull + '%'; 147 var newText = 'Buffer usage: ' + percentFull + '%';
150 if (Polymer.dom(bufferPercentFullDiv).textContent !== newText) 148 if (Polymer.dom(bufferPercentFullDiv).textContent !== newText) {
151 Polymer.dom(bufferPercentFullDiv).textContent = newText; 149 Polymer.dom(bufferPercentFullDiv).textContent = newText;
150 }
152 151
153 window.setTimeout(getBufferPercentFull, 500); 152 window.setTimeout(getBufferPercentFull, 500);
154 } 153 }
155 154
156 // Thats it! We're done. 155 // Thats it! We're done.
157 return finalPromise; 156 return finalPromise;
158 } 157 }
159 158
160 function endRecording(tracingControllerClient) { 159 function endRecording(tracingControllerClient) {
161 return tracingControllerClient.endRecording(); 160 return tracingControllerClient.endRecording();
(...skipping 10 matching lines...) Expand all
172 __proto__: Error.prototype 171 __proto__: Error.prototype
173 }; 172 };
174 173
175 return { 174 return {
176 beginRecording, 175 beginRecording,
177 UserCancelledError, 176 UserCancelledError,
178 defaultTraceName, 177 defaultTraceName,
179 }; 178 };
180 }); 179 });
181 </script> 180 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698