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

Unified Diff: tracing/tracing/model/helpers/chrome_browser_helper.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/model/helpers/chrome_browser_helper.html
diff --git a/tracing/tracing/model/helpers/chrome_browser_helper.html b/tracing/tracing/model/helpers/chrome_browser_helper.html
index 160a3262b51337ac313ba82119c8968516ab864d..12d42fdf88a1a53120131c75bf904aaaddc39368 100644
--- a/tracing/tracing/model/helpers/chrome_browser_helper.html
+++ b/tracing/tracing/model/helpers/chrome_browser_helper.html
@@ -18,8 +18,9 @@ tr.exportTo('tr.model.helpers', function() {
function ChromeBrowserHelper(modelHelper, process) {
tr.model.helpers.ChromeProcessHelper.call(this, modelHelper, process);
this.mainThread_ = process.findAtMostOneThreadNamed('CrBrowserMain');
- if (!process.name)
+ if (!process.name) {
process.name = ChromeBrowserHelper.PROCESS_NAME;
+ }
}
ChromeBrowserHelper.PROCESS_NAME = 'Browser';
@@ -65,14 +66,15 @@ tr.exportTo('tr.model.helpers', function() {
get hasLatencyEvents() {
var hasLatency = false;
- for (var thread of this.modelHelper.model.getAllThreads())
+ for (var thread of this.modelHelper.model.getAllThreads()) {
for (var event of thread.getDescendantEvents()) {
- if (!event.isTopLevel)
- continue;
- if (!(event instanceof tr.e.cc.InputLatencyAsyncSlice))
+ if (!event.isTopLevel) continue;
+ if (!(event instanceof tr.e.cc.InputLatencyAsyncSlice)) {
continue;
+ }
hasLatency = true;
}
+ }
return hasLatency;
},
@@ -87,9 +89,11 @@ tr.exportTo('tr.model.helpers', function() {
getAllAsyncSlicesMatching: function(pred, opt_this) {
var events = [];
this.iterAllThreads(function(thread) {
- for (var slice of thread.getDescendantEvents())
- if (pred.call(opt_this, slice))
+ for (var slice of thread.getDescendantEvents()) {
+ if (pred.call(opt_this, slice)) {
events.push(slice);
+ }
+ }
});
return events;
},
« no previous file with comments | « tracing/tracing/model/helpers/android_surface_flinger.html ('k') | tracing/tracing/model/helpers/chrome_gpu_helper.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698