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

Unified Diff: chrome/browser/resources/options/chromeos/internet_detail.js

Issue 1166763003: Do not always attempt to configure third party VPNs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable 'Connect' for unconfigured TPVPN Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 449ee3725eaa991f393ad43f5bd9379b1e3d12b2..f184016f373132ad194f2b4aa82edc3775b42c20 100644
--- a/chrome/browser/resources/options/chromeos/internet_detail.js
+++ b/chrome/browser/resources/options/chromeos/internet_detail.js
@@ -737,21 +737,24 @@ cr.define('options.internet', function() {
return;
}
+ var connectable = onc.getActiveValue('Connectable');
var connectState = onc.getActiveValue('ConnectionState');
if (connectState == 'NotConnected') {
+ $('details-internet-disconnect').hidden = true;
$('details-internet-login').hidden = false;
// Connecting to an unconfigured network might trigger certificate
// installation UI. Until that gets handled here, always enable the
- // Connect button.
- $('details-internet-login').disabled = false;
- $('details-internet-disconnect').hidden = true;
+ // Connect button for built-in networks.
+ var enabled = (this.type_ != 'VPN') ||
+ (onc.getActiveValue('VPN.Type') != 'ThirdPartyVPN') ||
+ connectable;
+ $('details-internet-login').disabled = !enabled;
} else {
$('details-internet-login').hidden = true;
$('details-internet-disconnect').hidden = false;
}
var showConfigure = false;
- var connectable = onc.getActiveValue('Connectable');
if (this.type_ == 'WiMAX' || this.type_ == 'VPN') {
showConfigure = true;
} else if (this.type_ == 'WiFi') {
@@ -1228,11 +1231,13 @@ cr.define('options.internet', function() {
var guid = onc.guid();
var type = onc.getActiveValue('Type');
- // VPNs do not correctly set 'Connectable', so we always show the
+ // Built-in VPNs do not correctly set 'Connectable', so we always show the
// configuration UI.
if (type == 'VPN') {
- chrome.send('configureNetwork', [guid]);
- return;
+ if (onc.getActiveValue('VPN.Type') != 'ThirdPartyVPN') {
+ chrome.send('configureNetwork', [guid]);
+ return;
+ }
}
// If 'Connectable' is false for WiFi or WiMAX, Shill requires
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698