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

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

Issue 11737038: Fix proxy settings so that a port number in the host field gets applied to the port field. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 12 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/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 e5e9390bd50536f5dc7b563e264454774923ea75..fa7c86252f8ac9d98a6dffd3f3984989da91c768 100644
--- a/chrome/browser/resources/options/chromeos/internet_detail.js
+++ b/chrome/browser/resources/options/chromeos/internet_detail.js
@@ -522,6 +522,39 @@ cr.define('options.internet', function() {
detailsPage.visible = true;
};
+ DetailsInternetPage.updateProxySettings = function(type) {
+ var proxyHost = null,
+ proxyPort = null;
+
+ if (type == 'cros.session.proxy.singlehttp') {
+ proxyHost = 'proxy-host-signal-name';
+ proxyPort = 'proxy-host-single-port';
+ }else if (type == 'cros.session.proxy.httpurl') {
+ proxyHost = 'proxy-host-name';
+ proxyPort = 'proxy-host-port';
+ }else if (type == 'cros.session.proxy.httpsurl') {
+ proxyHost = 'secure-proxy-host-name';
+ proxyPort = 'secure-proxy-port';
+ }else if (type == 'cros.session.proxy.ftpurl') {
+ proxyHost = 'ftp-proxy';
+ proxyPort = 'ftp-proxy-port';
+ }else if (type == 'cros.session.proxy.socks') {
+ proxyHost = 'socks-host';
+ proxyPort = 'socks-port';
+ }else {
+ return;
+ }
+
+ var hostValue = $(proxyHost).value;
+ if (hostValue.indexOf(':') !== -1) {
+ if (hostValue.match(/:/g).length == 1) {
+ hostValue = hostValue.split(':');
+ $(proxyHost).value = hostValue[0];
+ $(proxyPort).value = hostValue[1];
+ }
+ }
+ };
+
DetailsInternetPage.updateCarrier = function(carrier) {
DetailsInternetPage.showCarrierChangeSpinner(false);
};

Powered by Google App Engine
This is Rietveld 408576698