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

Unified Diff: chrome/browser/resources/settings/internet_page/internet_detail_page.js

Issue 2311473002: MD Settings: Third party VPN support (Closed)
Patch Set: Rebase Created 4 years, 3 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
Index: chrome/browser/resources/settings/internet_page/internet_detail_page.js
diff --git a/chrome/browser/resources/settings/internet_page/internet_detail_page.js b/chrome/browser/resources/settings/internet_page/internet_detail_page.js
index 90f58da001864f6f6577883b921e4f8f9bb38fe8..a1ddb8e17c76b119b5e34caf27f39c34b68608cf 100644
--- a/chrome/browser/resources/settings/internet_page/internet_detail_page.js
+++ b/chrome/browser/resources/settings/internet_page/internet_detail_page.js
@@ -164,7 +164,7 @@ Polymer({
// Update the detail page title.
this.parentNode.pageTitle =
- CrOnc.getNetworkName(this.networkProperties, this.i18n);
+ CrOnc.getNetworkName(this.networkProperties, this);
},
/** @private */
@@ -621,13 +621,16 @@ Polymer({
'RestrictedConnectivity', 'Cellular.ServingOperator.Name');
}
if (this.networkProperties.Type == CrOnc.Type.VPN) {
- fields.push('VPN.Host', 'VPN.Type');
- if (this.networkProperties.VPN.Type == 'OpenVPN')
- fields.push('VPN.OpenVPN.Username');
- else if (this.networkProperties.VPN.Type == 'L2TP-IPsec')
- fields.push('VPN.L2TP.Username');
- else if (this.networkProperties.VPN.Type == 'ThirdPartyVPN')
+ let vpnType = CrOnc.getActiveValue(this.networkProperties.VPN.Type);
+ if (vpnType == 'ThirdPartyVPN') {
fields.push('VPN.ThirdPartyVPN.ProviderName');
+ } else {
+ fields.push('VPN.Host', 'VPN.Type');
+ if (vpnType == 'OpenVPN')
+ fields.push('VPN.OpenVPN.Username');
+ else if (vpnType == 'L2TP-IPsec')
+ fields.push('VPN.L2TP.Username');
+ }
}
if (this.networkProperties.Type == CrOnc.Type.WI_FI)
fields.push('RestrictedConnectivity');
@@ -703,6 +706,14 @@ Polymer({
},
/**
+ * @return {boolean}
+ * @private
+ */
+ hasAdvancedOrDeviceFields_: function() {
+ return this.hasAdvancedFields_() || this.hasDeviceFields_();
+ },
+
+ /**
* @return {boolean} True if the network section should be shown.
* @private
*/

Powered by Google App Engine
This is Rietveld 408576698