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

Unified Diff: tracing/tracing/ui/tracks/cpu_track.html

Issue 2776653002: [ESLint] Fix violations when enabling curly rule in eslint. (Closed)
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
Index: tracing/tracing/ui/tracks/cpu_track.html
diff --git a/tracing/tracing/ui/tracks/cpu_track.html b/tracing/tracing/ui/tracks/cpu_track.html
index 0140f6cbacd02fbe02e0c461f901d44c5ca29149..5f5fa63e5fffe6326628f908a28f48d16adb50e0 100644
--- a/tracing/tracing/ui/tracks/cpu_track.html
+++ b/tracing/tracing/ui/tracks/cpu_track.html
@@ -59,22 +59,22 @@ tr.exportTo('tr.ui.tracks', function() {
},
get hasVisibleContent() {
- if (this.cpu_ === undefined)
- return false;
+ if (this.cpu_ === undefined) return false;
+
var cpu = this.cpu_;
- if (cpu.slices.length)
- return true;
- if (cpu.samples && cpu.samples.length)
- return true;
- if (tr.b.dictionaryLength(cpu.counters) > 0)
- return true;
+ if (cpu.slices.length) return true;
+
+ if (cpu.samples && cpu.samples.length) return true;
+
+ if (tr.b.dictionaryLength(cpu.counters) > 0) return true;
+
return false;
},
updateContents_: function() {
this.detach();
- if (!this.cpu_)
- return;
+ if (!this.cpu_) return;
+
var slices = this.cpu_.slices;
if (slices.length) {
var track = new tr.ui.tracks.SliceTrack(this.viewport);
@@ -99,12 +99,14 @@ tr.exportTo('tr.ui.tracks', function() {
appendSamplesTracks_: function() {
var samples = this.cpu_.samples;
- if (samples === undefined || samples.length === 0)
+ if (samples === undefined || samples.length === 0) {
return;
+ }
var samplesByTitle = {};
samples.forEach(function(sample) {
- if (samplesByTitle[sample.title] === undefined)
+ if (samplesByTitle[sample.title] === undefined) {
samplesByTitle[sample.title] = [];
+ }
samplesByTitle[sample.title].push(sample);
});
« no previous file with comments | « tracing/tracing/ui/tracks/counter_track_test.html ('k') | tracing/tracing/ui/tracks/cpu_usage_track_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698