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

Unified Diff: tracing/tracing/ui/find_controller.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
« no previous file with comments | « tracing/tracing/ui/find_control.html ('k') | tracing/tracing/ui/find_controller_test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/ui/find_controller.html
diff --git a/tracing/tracing/ui/find_controller.html b/tracing/tracing/ui/find_controller.html
index 50524ddfa0ad0310c323d477297c3ccde82c7a57..49322dd91a6999c815551b73e815cd4e6908ca3d 100644
--- a/tracing/tracing/ui/find_controller.html
+++ b/tracing/tracing/ui/find_controller.html
@@ -39,10 +39,11 @@ tr.exportTo('tr.ui', function() {
enqueueOperation_: function(operation) {
var task;
- if (operation instanceof tr.b.Task)
+ if (operation instanceof tr.b.Task) {
task = operation;
- else
+ } else {
task = new tr.b.Task(operation, this);
+ }
if (this.activeTask_) {
this.activeTask_ = this.activeTask_.enqueue(task);
} else {
@@ -62,8 +63,7 @@ tr.exportTo('tr.ui', function() {
*/
startFiltering: function(filterText) {
var sc = this.brushingStateController_;
- if (!sc)
- return;
+ if (!sc) return;
// TODO(beaudoin): Cancel anything left in the task queue, without
// invalidating the promise.
@@ -125,14 +125,14 @@ tr.exportTo('tr.ui', function() {
find_: function(dir) {
var firstHit = this.currentHitIndex_ === -1;
- if (firstHit && dir < 0)
+ if (firstHit && dir < 0) {
this.currentHitIndex_ = 0;
+ }
var N = this.filterHits.length;
this.currentHitIndex_ = (this.currentHitIndex_ + dir + N) % N;
- if (!this.brushingStateController_)
- return;
+ if (!this.brushingStateController_) return;
this.brushingStateController_.findFocusChangedTo(
new tr.model.EventSet(this.filterHits[this.currentHitIndex]));
« no previous file with comments | « tracing/tracing/ui/find_control.html ('k') | tracing/tracing/ui/find_controller_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698