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

Side by Side Diff: tracing/tracing/value/diagnostics/merged_telemetry_info.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 2017 The Chromium Authors. All rights reserved. 3 Copyright 2017 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/base/utils.html"> 8 <link rel="import" href="/tracing/base/utils.html">
9 <link rel="import" href="/tracing/value/diagnostics/diagnostic.html"> 9 <link rel="import" href="/tracing/value/diagnostics/diagnostic.html">
10 10
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 return telemetry[fieldName]; 265 return telemetry[fieldName];
266 } 266 }
267 267
268 /** 268 /**
269 * @param {!tr.v.Histogram} hist 269 * @param {!tr.v.Histogram} hist
270 * @param {string} storyGroupingKey 270 * @param {string} storyGroupingKey
271 * @return {string} 271 * @return {string}
272 */ 272 */
273 static getStoryGroupingKeyLabel(hist, storyGroupingKey) { 273 static getStoryGroupingKeyLabel(hist, storyGroupingKey) {
274 let telemetry = tr.v.d.TelemetryInfo.getFromHistogram(hist); 274 let telemetry = tr.v.d.TelemetryInfo.getFromHistogram(hist);
275 if (!(telemetry instanceof tr.v.d.MergedTelemetryInfo)) 275 if (!(telemetry instanceof tr.v.d.MergedTelemetryInfo)) {
276 return storyGroupingKey + ': undefined'; 276 return storyGroupingKey + ': undefined';
277 }
277 return storyGroupingKey + ': ' + 278 return storyGroupingKey + ': ' +
278 telemetry.storyGroupingKeys[storyGroupingKey]; 279 telemetry.storyGroupingKeys[storyGroupingKey];
279 } 280 }
280 281
281 /** 282 /**
282 * Returns a closure that gets a story grouping key label from a Histogram. 283 * Returns a closure that gets a story grouping key label from a Histogram.
283 * 284 *
284 * @param {string} storyGroupingKey 285 * @param {string} storyGroupingKey
285 * @return {!function(tr.v.Histogram):string} 286 * @return {!function(tr.v.Histogram):string}
286 */ 287 */
287 static makeStoryGroupingKeyLabelGetter(storyGroupingKey) { 288 static makeStoryGroupingKeyLabelGetter(storyGroupingKey) {
288 return v => MergedTelemetryInfo.getStoryGroupingKeyLabel( 289 return v => MergedTelemetryInfo.getStoryGroupingKeyLabel(
289 v, storyGroupingKey); 290 v, storyGroupingKey);
290 } 291 }
291 } 292 }
292 293
293 tr.v.d.Diagnostic.register(MergedTelemetryInfo, { 294 tr.v.d.Diagnostic.register(MergedTelemetryInfo, {
294 elementName: 'tr-v-ui-merged-telemetry-info-span' 295 elementName: 'tr-v-ui-merged-telemetry-info-span'
295 }); 296 });
296 297
297 return { 298 return {
298 MergedTelemetryInfo, 299 MergedTelemetryInfo,
299 }; 300 };
300 }); 301 });
301 </script> 302 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698