| 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 7193f7905f91c87145161b68bfb15e0169ebb0a3..950061dd435b34c86f570ecbab1a86805288a404 100644
|
| --- a/chrome/browser/resources/options/chromeos/internet_detail.js
|
| +++ b/chrome/browser/resources/options/chromeos/internet_detail.js
|
| @@ -1163,8 +1163,27 @@ cr.define('options.internet', function() {
|
| sendChromeMetricsAction('Options_NetworkConnectToWifi');
|
| else if (detailsPage.type_ == 'VPN')
|
| sendChromeMetricsAction('Options_NetworkConnectToVPN');
|
| - // TODO(stevenjb): chrome.networkingPrivate.startConnect
|
| - chrome.send('startConnect', [detailsPage.onc_.guid()]);
|
| +
|
| + var onc = detailsPage.onc_;
|
| + var guid = onc.guid();
|
| +
|
| + // Unconfigured networks, VPNs, and secure WiFi networks with ErrorState
|
| + // set require configuration before they can be connected to.
|
| + if (!onc.getActiveValue('Connectable') || (detailsPage.type_ == 'VPN') ||
|
| + (detailsPage.type_ == 'WiFi' && onc.getActiveValue('ErrorState') &&
|
| + onc.getWiFiSecurity() != 'None')) {
|
| + chrome.send('configureNetwork', [guid]);
|
| + return;
|
| + }
|
| +
|
| + if (detailsPage.type_ == 'Cellular') {
|
| + var activationState = onc.getActiveValue('Cellular.ActivationState');
|
| + if (activationState != 'Activated' && activationState != 'Unknown') {
|
| + DetailsInternetPage.activateCellular(guid);
|
| + return;
|
| + }
|
| + }
|
| + chrome.networkingPrivate.startConnect(guid);
|
| PageManager.closeOverlay();
|
| };
|
|
|
|
|