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

Side by Side Diff: chrome/browser/resources/settings/internet_page/network_apnlist.js

Issue 2946563002: Run clang-format on .js files in c/b/r/settings (Closed)
Patch Set: dschuyler@ review 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 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 and modifying a list of cellular 6 * @fileoverview Polymer element for displaying and modifying a list of cellular
7 * access points. 7 * access points.
8 */ 8 */
9 Polymer({ 9 Polymer({
10 is: 'network-apnlist', 10 is: 'network-apnlist',
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 return /** @type {!Array<!CrOnc.APNProperties>} */ ( 174 return /** @type {!Array<!CrOnc.APNProperties>} */ (
175 CrOnc.getActiveValue(apnlist)); 175 CrOnc.getActiveValue(apnlist));
176 }, 176 },
177 177
178 /** 178 /**
179 * Event triggered when the selectApn selection changes. 179 * Event triggered when the selectApn selection changes.
180 * @param {!Event} event 180 * @param {!Event} event
181 * @private 181 * @private
182 */ 182 */
183 onSelectApnChange_: function(event) { 183 onSelectApnChange_: function(event) {
184 var target = /** @type {!HTMLSelectElement} */(event.target); 184 var target = /** @type {!HTMLSelectElement} */ (event.target);
185 var accessPointName = target.value; 185 var accessPointName = target.value;
186 // When selecting 'Other', don't set a change event unless a valid 186 // When selecting 'Other', don't set a change event unless a valid
187 // non-default value has been set for Other. 187 // non-default value has been set for Other.
188 if (this.isOtherSelected_(accessPointName) && 188 if (this.isOtherSelected_(accessPointName) &&
189 (!this.otherApn_ || !this.otherApn_.AccessPointName || 189 (!this.otherApn_ || !this.otherApn_.AccessPointName ||
190 this.otherApn_.AccessPointName == this.DefaultAccessPointName)) { 190 this.otherApn_.AccessPointName == this.DefaultAccessPointName)) {
191 this.selectedApn_ = accessPointName; 191 this.selectedApn_ = accessPointName;
192 return; 192 return;
193 } 193 }
194 this.sendApnChange_(accessPointName); 194 this.sendApnChange_(accessPointName);
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 * @return {CrOnc.APNProperties|undefined} The entry in |apnList| matching 260 * @return {CrOnc.APNProperties|undefined} The entry in |apnList| matching
261 * |accessPointName| if it exists, or undefined. 261 * |accessPointName| if it exists, or undefined.
262 * @private 262 * @private
263 */ 263 */
264 findApnInList: function(apnList, accessPointName) { 264 findApnInList: function(apnList, accessPointName) {
265 return apnList.find(function(a) { 265 return apnList.find(function(a) {
266 return a.AccessPointName == accessPointName; 266 return a.AccessPointName == accessPointName;
267 }); 267 });
268 } 268 }
269 }); 269 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698