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

Side by Side Diff: tracing/tracing/ui/analysis/single_cpu_slice_sub_view.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/base/iteration_helpers.html"> 8 <link rel="import" href="/tracing/base/iteration_helpers.html">
9 <link rel="import" href="/tracing/base/unit.html"> 9 <link rel="import" href="/tracing/base/unit.html">
10 <link rel="import" href="/tracing/base/utils.html"> 10 <link rel="import" href="/tracing/base/utils.html">
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 created: function() { 89 created: function() {
90 this.currentSelection_ = undefined; 90 this.currentSelection_ = undefined;
91 }, 91 },
92 92
93 get selection() { 93 get selection() {
94 return this.currentSelection_; 94 return this.currentSelection_;
95 }, 95 },
96 96
97 set selection(selection) { 97 set selection(selection) {
98 var cpuSlice = tr.b.getOnlyElement(selection); 98 var cpuSlice = tr.b.getOnlyElement(selection);
99 if (!(cpuSlice instanceof tr.model.CpuSlice)) 99 if (!(cpuSlice instanceof tr.model.CpuSlice)) {
100 throw new Error('Only supports thread time slices'); 100 throw new Error('Only supports thread time slices');
101 }
101 102
102 this.currentSelection_ = selection; 103 this.currentSelection_ = selection;
103 104
104 var thread = cpuSlice.threadThatWasRunning; 105 var thread = cpuSlice.threadThatWasRunning;
105 106
106 var root = Polymer.dom(this.root); 107 var root = Polymer.dom(this.root);
107 if (thread) { 108 if (thread) {
108 Polymer.dom(root.querySelector('#process-name')).textContent = 109 Polymer.dom(root.querySelector('#process-name')).textContent =
109 thread.parent.userFriendlyName; 110 thread.parent.userFriendlyName;
110 Polymer.dom(root.querySelector('#thread-name')).textContent = 111 Polymer.dom(root.querySelector('#thread-name')).textContent =
(...skipping 29 matching lines...) Expand all
140 }); 141 });
141 142
142 tr.ui.analysis.AnalysisSubView.register( 143 tr.ui.analysis.AnalysisSubView.register(
143 'tr-ui-a-single-cpu-slice-sub-view', 144 'tr-ui-a-single-cpu-slice-sub-view',
144 tr.model.CpuSlice, 145 tr.model.CpuSlice,
145 { 146 {
146 multi: false, 147 multi: false,
147 title: 'CPU Slice', 148 title: 'CPU Slice',
148 }); 149 });
149 </script> 150 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698