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

Side by Side Diff: ui/webui/resources/cr_elements/network/cr_network_list_item.js

Issue 2603443002: Clang format JS: Disallow single line functions, conditionals, loops, and switch statements (Closed)
Patch Set: update c/b/r/ as well Created 3 years, 12 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview Polymer element for displaying information about a network 6 * @fileoverview Polymer element for displaying information about a network
7 * in a list or summary based on ONC state properties. 7 * in a list or summary based on ONC state properties.
8 */ 8 */
9 9
10 Polymer({ 10 Polymer({
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 return CrOnc.getNetworkName(network, this); 94 return CrOnc.getNetworkName(network, this);
95 return this.i18n('OncType' + network.Type); 95 return this.i18n('OncType' + network.Type);
96 }, 96 },
97 97
98 /** @private */ 98 /** @private */
99 isStateTextVisible_() { 99 isStateTextVisible_() {
100 return !!this.networkState && (!this.isListItem || this.isConnected_()); 100 return !!this.networkState && (!this.isListItem || this.isConnected_());
101 }, 101 },
102 102
103 /** @private */ 103 /** @private */
104 isStateTextConnected_() { return this.isListItem && this.isConnected_(); }, 104 isStateTextConnected_() {
105 return this.isListItem && this.isConnected_();
106 },
105 107
106 /** 108 /**
107 * This only gets called for network items once networkState is set. 109 * This only gets called for network items once networkState is set.
108 * @private 110 * @private
109 */ 111 */
110 getNetworkStateText_: function() { 112 getNetworkStateText_: function() {
111 if (!this.isStateTextVisible_()) 113 if (!this.isStateTextVisible_())
112 return ''; 114 return '';
113 let network = this.networkState; 115 let network = this.networkState;
114 if (this.isListItem) { 116 if (this.isListItem) {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 * Fires a 'show-details' event with |this.networkState| as the details. 160 * Fires a 'show-details' event with |this.networkState| as the details.
159 * @param {Event} event 161 * @param {Event} event
160 * @private 162 * @private
161 */ 163 */
162 fireShowDetails_: function(event) { 164 fireShowDetails_: function(event) {
163 assert(this.networkState); 165 assert(this.networkState);
164 this.fire('show-detail', this.networkState); 166 this.fire('show-detail', this.networkState);
165 event.stopPropagation(); 167 event.stopPropagation();
166 }, 168 },
167 }); 169 });
OLDNEW
« no previous file with comments | « ui/webui/resources/cr_elements/network/cr_network_list.js ('k') | ui/webui/resources/cr_elements/network/cr_network_select.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698