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

Unified Diff: tracing/tracing/base/unit.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/base/timing_test.html ('k') | tracing/tracing/base/unit_scale.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/base/unit.html
diff --git a/tracing/tracing/base/unit.html b/tracing/tracing/base/unit.html
index 9ff4e038227aa9f7f7e992f757c1c37514177ad0..e2ed793f65652f28a0c3b45adce92082812fb0b2 100644
--- a/tracing/tracing/base/unit.html
+++ b/tracing/tracing/base/unit.html
@@ -53,10 +53,8 @@ tr.exportTo('tr.b', function() {
}
function max(a, b) {
- if (a === undefined)
- return b;
- if (b === undefined)
- return a;
+ if (a === undefined) return b;
+ if (b === undefined) return a;
return a.scale > b.scale ? a : b;
}
@@ -206,8 +204,7 @@ tr.exportTo('tr.b', function() {
},
// Use tr-v-ui-preferred-display-unit element instead of directly setting.
set: function(value) {
- if (Unit.currentTimeDisplayMode_ === value)
- return;
+ if (Unit.currentTimeDisplayMode_ === value) return;
Unit.currentTimeDisplayMode_ = value;
Unit.dispatchEvent(new tr.b.Event('display-mode-changed'));
@@ -304,10 +301,12 @@ tr.exportTo('tr.b', function() {
var unitName = params.baseUnitName + nameSuffix;
var jsonName = params.baseJsonName + nameSuffix;
- if (Unit.byName[unitName] !== undefined)
+ if (Unit.byName[unitName] !== undefined) {
throw new Error('Unit \'' + unitName + '\' already exists');
- if (Unit.byJSONName[jsonName] !== undefined)
+ }
+ if (Unit.byJSONName[jsonName] !== undefined) {
throw new Error('JSON unit \'' + jsonName + '\' alread exists');
+ }
var scaleBaseUnit = params.scaleBaseUnit;
if (!scaleBaseUnit) {
« no previous file with comments | « tracing/tracing/base/timing_test.html ('k') | tracing/tracing/base/unit_scale.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698