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

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

Issue 2913323003: Settings: Network: Merge Tether networks into Mobile subpage (Closed)
Patch Set: Fix browser_tests 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 6 * @fileoverview
7 * 'settings-internet-page' is the settings page containing internet 7 * 'settings-internet-page' is the settings page containing internet
8 * settings. 8 * settings.
9 */ 9 */
10 Polymer({ 10 Polymer({
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 269
270 /** 270 /**
271 * @return {string} 271 * @return {string}
272 * @private 272 * @private
273 */ 273 */
274 getNetworksPageTitle_: function() { 274 getNetworksPageTitle_: function() {
275 return this.i18n('OncType' + this.subpageType_); 275 return this.i18n('OncType' + this.subpageType_);
276 }, 276 },
277 277
278 /** 278 /**
279 * @param {string} subpageType
280 * @param {!Object<!CrOnc.DeviceStateProperties>|undefined} deviceStates
281 * @return {!CrOnc.DeviceStateProperties|undefined}
282 * @private
283 */
284 getDeviceState_: function(subpageType, deviceStates) {
285 // If both Tether and Cellular are enabled, use the Cellular device state
286 // when directly navigating to the Tether page.
287 if (subpageType == CrOnc.Type.TETHER &&
288 this.deviceStates[CrOnc.Type.CELLULAR]) {
289 subpageType = CrOnc.Type.CELLULAR;
290 }
291 return deviceStates[subpageType];
292 },
293
294 /**
279 * @param {!{detail: {type: string}}} event 295 * @param {!{detail: {type: string}}} event
280 * @private 296 * @private
281 */ 297 */
282 onShowKnownNetworks_: function(event) { 298 onShowKnownNetworks_: function(event) {
283 this.detailType_ = event.detail.Type; 299 this.detailType_ = event.detail.Type;
284 var params = new URLSearchParams; 300 var params = new URLSearchParams;
285 params.append('type', event.detail.Type); 301 params.append('type', event.detail.Type);
286 this.knownNetworksType_ = event.detail.type; 302 this.knownNetworksType_ = event.detail.type;
287 settings.navigateTo(settings.Route.KNOWN_NETWORKS, params); 303 settings.navigateTo(settings.Route.KNOWN_NETWORKS, params);
288 }, 304 },
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 message == 'connected' || message == 'Error.InvalidNetworkGuid') { 462 message == 'connected' || message == 'Error.InvalidNetworkGuid') {
447 return; 463 return;
448 } 464 }
449 console.error( 465 console.error(
450 'Unexpected networkingPrivate.startConnect error: ' + message + 466 'Unexpected networkingPrivate.startConnect error: ' + message +
451 ' For: ' + properties.GUID); 467 ' For: ' + properties.GUID);
452 } 468 }
453 }); 469 });
454 }, 470 },
455 }); 471 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698