Chromium Code Reviews| Index: chrome/browser/resources/options/chromeos/internet_detail.js |
| diff --git a/chrome/browser/resources/options/chromeos/internet_detail.js b/chrome/browser/resources/options/chromeos/internet_detail.js |
| index 81c5888cc181132c877f1ef7a8a093771cac7922..892f36ffda1d663a9d2dad5b339eeeddbb8d7413 100644 |
| --- a/chrome/browser/resources/options/chromeos/internet_detail.js |
| +++ b/chrome/browser/resources/options/chromeos/internet_detail.js |
| @@ -1307,15 +1307,18 @@ cr.define('options.internet', function() { |
| $('prefer-network-wifi').checked = priority > 0; |
| $('prefer-network-wifi').disabled = !remembered; |
| $('auto-connect-network-wifi').checked = |
| - onc.getActiveValue('AutoConnect'); |
| + onc.getActiveValue('WiFi.AutoConnect'); |
| $('auto-connect-network-wifi').disabled = !remembered; |
| } else if (type == 'Wimax') { |
| OptionsPage.showTab($('wimax-network-nav-tab')); |
| $('wimax-restricted-connectivity').textContent = restrictedString; |
| - $('auto-connect-network-wimax').checked = |
| - onc.getActiveValue('AutoConnect'); |
| - $('auto-connect-network-wimax').disabled = !remembered; |
| - var identity = onc.getActiveValue('Wimax.EAP.Identity'); |
| + |
| + // ONC does not support Wimax properties, yet. |
| + $('auto-connect-network-wimax').parentElement.hidden = true; |
| + // $('auto-connect-network-wimax').checked = |
| + // onc.getActiveValue('Wimax.AutoConnect'); |
| + // $('auto-connect-network-wimax').disabled = !remembered; |
| + var identity; // = onc.getActiveValue('Wimax.EAP.Identity'); |
|
stevenjb
2014/09/15 16:38:41
Do we actually need to remove this? The code shoul
pneubeck (no reviews)
2014/09/15 20:27:13
As discussed this should already handle it gracefu
|
| setOrHideParent('wimax-eap-identity', identity); |
| $('wimax-signal-strength').textContent = strengthString; |
| } else if (type == 'Cellular') { |
| @@ -1380,7 +1383,7 @@ cr.define('options.internet', function() { |
| detailsPage.initializeApnList_(onc); |
| } |
| $('auto-connect-network-cellular').checked = |
| - onc.getActiveValue('AutoConnect'); |
| + onc.getActiveValue('Cellular.AutoConnect'); |
| $('auto-connect-network-cellular').disabled = false; |
| } else if (type == 'VPN') { |
| OptionsPage.showTab($('vpn-nav-tab')); |
| @@ -1388,9 +1391,18 @@ cr.define('options.internet', function() { |
| $('inet-provider-type').textContent = |
| onc.getTranslatedValue('VPN.Type'); |
| var providerType = onc.getActiveValue('VPN.Type'); |
| - var providerKey = 'VPN.' + providerType; |
| - $('inet-username').textContent = |
| - onc.getActiveValue(providerKey + '.Username'); |
| + var usernameKey; |
| + if (providerType == 'OpenVPN') |
| + usernameKey = 'VPN.OpenVPN.Username'; |
| + else if (providerType == 'L2TP-IPsec') |
| + usernameKey = 'VPN.L2TP.Username'; |
| + |
| + if (usernameKey) { |
| + $('inet-username').parentElement.hidden = false; |
| + $('inet-username').textContent = onc.getActiveValue(usernameKey); |
| + } else { |
| + $('inet-username').parentElement.hidden = true; |
| + } |
| var inetServerHostname = $('inet-server-hostname'); |
| inetServerHostname.value = onc.getActiveValue('VPN.Host'); |
| inetServerHostname.resetHandler = function() { |
| @@ -1400,7 +1412,7 @@ cr.define('options.internet', function() { |
| inetServerHostname.value = recommended; |
| }; |
| $('auto-connect-network-vpn').checked = |
| - onc.getActiveValue('AutoConnect'); |
| + onc.getActiveValue('VPN.AutoConnect'); |
| $('auto-connect-network-vpn').disabled = false; |
| } else { |
| OptionsPage.showTab($('internet-nav-tab')); |