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

Unified Diff: tracing/tracing/ui/base/mouse_mode_icon.html

Issue 2959713003: Remove tr.b.findFirstKeyInDictMatching. (Closed)
Patch Set: rebase Created 3 years, 6 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/multi_dimensional_view_test.html ('k') | tracing/tracing/ui/base/mouse_modes.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/ui/base/mouse_mode_icon.html
diff --git a/tracing/tracing/ui/base/mouse_mode_icon.html b/tracing/tracing/ui/base/mouse_mode_icon.html
index 08fe5a33567e7b41bdaba8922b22ae45fe9a5b4f..68a638b8a3508f510d85cf3b7950f4d62d5782c1 100644
--- a/tracing/tracing/ui/base/mouse_mode_icon.html
+++ b/tracing/tracing/ui/base/mouse_mode_icon.html
@@ -51,15 +51,10 @@ Polymer({
set mode(mode) {
const modeInfo = tr.ui.b.MOUSE_SELECTOR_MODE_INFOS[mode];
- const modeName = tr.b.findFirstKeyInDictMatching(
- tr.ui.b.MOUSE_SELECTOR_MODE,
- function(modeName, candidateMode) {
- return candidateMode === mode;
- });
- if (modeName === undefined) {
+ if (modeInfo === undefined) {
throw new Error('Unknown mode');
}
- this.modeName = modeName;
+ this.modeName = modeInfo.name;
},
modeNameChanged() {
« no previous file with comments | « tracing/tracing/base/multi_dimensional_view_test.html ('k') | tracing/tracing/ui/base/mouse_modes.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698