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

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

Issue 2957153003: MD Settings: remove unsupported routes from guest-mode. (Closed)
Patch Set: merge Created 3 years, 5 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 6 * @fileoverview
7 * 'settings-internet-config' provides configuration of authentication 7 * 'settings-internet-config' provides configuration of authentication
8 * properties for new and existing networks. 8 * properties for new and existing networks.
9 */ 9 */
10 Polymer({ 10 Polymer({
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 186
187 /** @const */ 187 /** @const */
188 MIN_PASSPHRASE_LENGTH: 5, 188 MIN_PASSPHRASE_LENGTH: 5,
189 189
190 /** 190 /**
191 * settings.RouteObserverBehavior 191 * settings.RouteObserverBehavior
192 * @param {!settings.Route} route 192 * @param {!settings.Route} route
193 * @protected 193 * @protected
194 */ 194 */
195 currentRouteChanged: function(route) { 195 currentRouteChanged: function(route) {
196 if (route != settings.Route.NETWORK_CONFIG) 196 if (route != settings.routes.NETWORK_CONFIG)
197 return; 197 return;
198 198
199 this.propertiesSent_ = false; 199 this.propertiesSent_ = false;
200 this.savedSecurity_ = ''; 200 this.savedSecurity_ = '';
201 this.showEap_ = null; 201 this.showEap_ = null;
202 202
203 var queryParams = settings.getQueryParameters(); 203 var queryParams = settings.getQueryParameters();
204 this.guid_ = queryParams.get('guid') || ''; 204 this.guid_ = queryParams.get('guid') || '';
205 205
206 // Set networkProperties for new configurations and for existing 206 // Set networkProperties for new configurations and for existing
207 // configurations until the current properties are loaded. 207 // configurations until the current properties are loaded.
208 var name = queryParams.get('name') || ''; 208 var name = queryParams.get('name') || '';
209 var typeParam = queryParams.get('type'); 209 var typeParam = queryParams.get('type');
210 var type = typeParam ? CrOnc.getValidType(typeParam) : CrOnc.Type.WI_FI; 210 var type = typeParam ? CrOnc.getValidType(typeParam) : CrOnc.Type.WI_FI;
211 assert(type && type != CrOnc.Type.ALL); 211 assert(type && type != CrOnc.Type.ALL);
212 this.networkProperties_ = { 212 this.networkProperties_ = {
213 GUID: this.guid_, 213 GUID: this.guid_,
214 Name: name, 214 Name: name,
215 Type: type, 215 Type: type,
216 }; 216 };
217 if (this.guid_) { 217 if (this.guid_) {
218 this.networkingPrivate.getProperties( 218 this.networkingPrivate.getProperties(
219 this.guid_, this.getPropertiesCallback_.bind(this)); 219 this.guid_, this.getPropertiesCallback_.bind(this));
220 } 220 }
221 }, 221 },
222 222
223 /** @private */ 223 /** @private */
224 close_: function() { 224 close_: function() {
225 if (settings.getCurrentRoute() == settings.Route.NETWORK_CONFIG) 225 if (settings.getCurrentRoute() == settings.routes.NETWORK_CONFIG)
226 settings.navigateToPreviousRoute(); 226 settings.navigateToPreviousRoute();
227 }, 227 },
228 228
229 /** 229 /**
230 * networkingPrivate.getProperties callback. 230 * networkingPrivate.getProperties callback.
231 * @param {!chrome.networkingPrivate.NetworkProperties} properties 231 * @param {!chrome.networkingPrivate.NetworkProperties} properties
232 * @private 232 * @private
233 */ 233 */
234 getPropertiesCallback_: function(properties) { 234 getPropertiesCallback_: function(properties) {
235 if (!properties) { 235 if (!properties) {
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 * @private 539 * @private
540 */ 540 */
541 getEapInnerItems_: function(outer) { 541 getEapInnerItems_: function(outer) {
542 if (outer == CrOnc.EAPType.PEAP) 542 if (outer == CrOnc.EAPType.PEAP)
543 return this.eapInnerItemsPeap_; 543 return this.eapInnerItemsPeap_;
544 if (outer == CrOnc.EAPType.EAP_TTLS) 544 if (outer == CrOnc.EAPType.EAP_TTLS)
545 return this.eapInnerItemsTtls_; 545 return this.eapInnerItemsTtls_;
546 return []; 546 return [];
547 }, 547 },
548 }); 548 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698